bosonai/asr: Speech-to-text.bosonai/tts: Text-to-speech.
Use Cases
- Transcription: Convert meetings, calls, lectures, or voice notes into searchable text.
- Voice assistants: Combine ASR, an LLM, and TTS to build conversational voice experiences.
- Subtitles and captions: Generate captions and subtitles for video and audio content.
- Accessibility: Read content aloud, or let users interact by voice instead of typing.
Usage
Both types of models are called through the/chat/completions endpoint and the messages array, similar to chat models. The main difference is the input and output content.
- Text-to-speech (TTS): Send the text to be spoken as a normal user message. The generated audio appears in
choices[0].message.audio.dataas base64-encoded WAV. Decode it and write it to a file to play it. - Speech-to-text (ASR): Send audio as a content part of type
input_audio, including the base64 data andformatinformation such aswav. The transcription result is returned as plain text inchoices[0].message.content.
Key Parameters
- TTS:
model:bosonai/tts.messages: Theroleisuser, andcontentis the text to be spoken.
- ASR:
model:bosonai/asr.messages: Theroleisuser, andcontentis an array containing{"type": "input_audio", "input_audio": {"data": "<base64>", "format": "wav"}}.
Notes
- Supported audio formats and maximum file size or duration vary by model. For details, refer to the model details in Models.
- For long audio, splitting it into shorter segments helps stay within limits and reduces timeout risk.
Billing
- Pricing unit: Speech models are typically billed by audio duration or by the number of characters/tokens processed, depending on the model. Check the model details in Models for the exact pricing unit.
- Recommendation: For longer recordings, split the audio into multiple segments and process them separately to reduce timeout and retry costs.

