curl --request POST \ --url https://api.gurubase.io/api/v1/{guru_slug}/text-to-speech/stream/ \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "text": "Hello, this is a test message with some code: `console.log(\"hello\")` and a code block:\n```python\ndef hello():\n print(\"hello\")\n```" }'
{ "msg": "No text provided"}
Endpoints
Text-to-Speech Stream
Convert text to speech and stream audio response
POST
/
{guru_type}
/
text-to-speech
/
stream
curl --request POST \ --url https://api.gurubase.io/api/v1/{guru_slug}/text-to-speech/stream/ \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "text": "Hello, this is a test message with some code: `console.log(\"hello\")` and a code block:\n```python\ndef hello():\n print(\"hello\")\n```" }'
{ "msg": "No text provided"}
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.
curl --request POST \ --url https://api.gurubase.io/api/v1/{guru_slug}/text-to-speech/stream/ \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "text": "Hello, this is a test message with some code: `console.log(\"hello\")` and a code block:\n```python\ndef hello():\n print(\"hello\")\n```" }'