Endpoints
Text-to-Speech Stream
Convert text to speech and stream audio response
POST
Convert text to speech and stream the audio response. This endpoint processes text by replacing code blocks with “Code block” and inline code with “Inline code” before generating speech.
Path Parameters
The guru type identifier for the text-to-speech request
Headers
Your API key for authentication. You can obtain your API key from the Gurubase dashboard.
Body Parameters
The text to convert to speech. Code blocks and inline code will be processed and replaced with “Code block” and “Inline code” respectively.
Response
The response is a streaming audio file in MP3 format.Streaming audio response in MP3 format
Text Processing
The endpoint automatically processes text before converting to speech:- Code blocks: Any text wrapped in triple backticks (```) is replaced with “Code block”
- Inline code: Any text wrapped in single backticks (`) is replaced with “Inline code”
Streaming Response
The endpoint returns a streaming audio response with the following headers:Content-Type: audio/mpegCache-Control: no-cacheX-Accel-Buffering: no(disables nginx buffering for real-time streaming)