curl --request POST \ --url https://api.gurubase.io/api/v1/gurubase/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```" }'
Copy
{ "msg": "No text provided"}
Endpoints
Text-to-Speech Stream
Convert text to speech and stream audio response
POST
/
{guru_type}
/
text-to-speech
/
stream
/
Copy
curl --request POST \ --url https://api.gurubase.io/api/v1/gurubase/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```" }'
Copy
{ "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.
Copy
curl --request POST \ --url https://api.gurubase.io/api/v1/gurubase/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```" }'