1. 文字转语音大模型
MyVocal AI语音大模型API文档
English
  • 中文
  • English
  • 文字转语音大模型
    • API reference
      • Voice management
        • List voices
        • Create a voice
        • Delete a voice
      • HTTP synthesis
        • Streaming HTTP synthesis
        • Non-streaming HTTP synthesis
      • WebSocket synthesis
        • Standard TTS · Single connection
        • Standard TTS · Multiple contexts
        • Dialogue · Multiple contexts
      • Usage and request history
        • Get master key usage
        • Look up a request by ID
        • Get usage by voice
      • Sub-key management
        • Create a sub-key
        • List sub-keys
        • Get sub-key details
        • Update a sub-key
        • Get sub-key usage
    • Overview and quickstart
      • Models
      • Choose a model and endpoint
      • Supported languages
      • Audio formats and playback
      • FAQ
      • SDKs and examples
  • 金融行业定制TTS模型
    • Skyblight text to speech
      • Streaming text to speech
      • Non-streaming text to speech
      • List voices
      • Delete a voice
      • Create a voice
      • Get usage
    • Full-duplex communication
      • WebSocket integration guide
      • V2 bidirectional streaming synthesis (WebSocket)
  • 语音转文字ASR
    • Overview and quickstarts
      • Realtime transcription quickstart
      • File transcription quickstart
      • Models and capabilities
      • Changelog
    • API reference
      • Realtime transcription over WebSocket
      • Create a file transcription
      • Get ASR usage
  • 企业客户声音定制服务
    • Your custom brand voice
  1. 文字转语音大模型

Overview and quickstart

Turn text into speech for content production, live interactions or dialogue between characters. For your first request, generate a complete audio file. Then choose HTTP streaming or WebSocket if your application needs it.

Start here#

New to the API? Follow the steps below to generate audio.
Choosing a model? See Models and Choose a model and endpoint.
Already integrated? Go to the API reference or SDKs and examples.

Generate your first audio file#

1. Get your API key and choose a voice#

Pass your enterprise API key in the api-key header. List the voices available to your account and choose a voice_id. If you already have one, continue to the next step.
Use the key on your server. Keep it out of browser code and public repositories.

2. Send a synthesis request#

Replace YOUR_API_KEY and YOUR_VOICE_ID with your own values. This example uses V4, Mandarin Chinese and MP3.
The command uses Bash syntax on macOS or Linux. For other environments, see the code examples on the endpoint page.

3. Save and play the audio#

A successful request returns HTTP 200 with audio in the response body. The example saves it as speech.mp3. If the request fails, read the error response before attempting playback. A JSON error cannot be played as audio.

Next steps#

Play audio as it arrives: Stream audio over HTTP.
Send text as it becomes available: Choose a WebSocket endpoint for your model.
Generate dialogue with several speakers: Multi-context dialogue over WebSocket.
Set a language or format: Supported languages and Audio formats and playback.
Check requests and usage: Usage and request history.
Troubleshoot a request: FAQ.

Models#

See Models for each model’s strengths, use cases and controls.

Models and synthesis endpoints#

Choose an endpoint based on the model and how your text arrives. See Choose a model and endpoint.

Output languages for V4 and V3 Turbo#

V4 and V3 Turbo support the same 94 languages. See Supported languages.
上一页
Get sub-key usage
下一页
Models
Built with