Skip to main content

Text to Speech

POST 

/v1/tools/tts

Convert text into speech. The audio is streamed in the response body as it is synthesized. See the Text to Speech guide for the voices, languages, limits, errors and billing.

To send the text in chunks, for example while a model is still generating it, connect to the same path over WebSocket (wss://api.deepseek.com/v1/tools/tts). The WebSocket protocol is described in the Text to Speech guide.

Request​

Body

required

    text stringrequired

    The text to read. Must not be empty.

    voice_id string

    Possible values: stella, tide

    Default value: stella

    The voice. stella is a female voice and tide is a male voice.

    format string

    Possible values: wav, pcm

    Default value: wav

    The audio format of the response. wav returns audio/wav; pcm returns raw 16-bit signed mono PCM at 24 kHz.

    filter_markdown boolean

    Default value: true

    Whether to remove Markdown formatting from the text before reading it.

Responses​

OK, returns the audio as a stream. By default the body is a WAV file. When format is pcm, the body is raw 16-bit signed mono PCM at 24 kHz and the Content-Type is audio/pcm.

Schema

    string

Loading...