1. Overview and quickstarts
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 quickstarts

File transcription quickstart

Upload a recording and read its transcript from the response.

Before you start#

Prepare an enterprise ASR API key and an audio file named sample.wav. The commands work in Bash or zsh. On Windows, use WSL or Git Bash.

Send your first request#

Replace YOUR_API_KEY with your key and sample.wav with the path to your file.
Upload the file using --form. cURL sets the multipart/form-data header and boundary automatically, so leave Content-Type to cURL.

Read the result#

A successful request returns HTTP 200. Example response:
{
  "language": "en",
  "confidence_score": 0.98,
  "text": "Hello.",
  "words": [
    {
      "text": "Hello.",
      "start_time": 0.0,
      "end_time": 0.5,
      "confidence_score": 0.98,
      "token_type": "word"
    }
  ]
}
Read the transcript from text. For word-level information, read words. Fields may vary by model and options. See Create a file transcription.

Number formatting and multilingual recordings#

The file model documented to support number_style and additional_language_codes is echo_v2.
For a meeting mainly in English, send language=en. To include Mandarin and Spanish, send additional_language_codes=zh and additional_language_codes=es as separate form fields in the same request. For a hosted recording, replace file with cloud_url.
View all parameters and the cURL example

Transcribe a medical recording#

Use the same endpoint and change the model field to:
model_id=echo_v2_medical
The medical model uses the HTTP file transcription endpoint. See Models and capabilities for realtime models and advanced feature compatibility.

Troubleshooting#

SymptomWhat to check first
HTTP 401Is the key valid and in the API-Key header?
missing_inputWas a file uploaded? Does the local path exist?
HTTP 400 / validation_errorIf detail.message contains invalid model_id, check that the endpoint supports the specified model. Example error responses
HTTP 200 with empty textDoes the recording contain intelligible speech, or mainly silence?

Next steps#

Models and capabilities.
View all file transcription parameters for timestamps, speakers and recognition options.
Check usage for the date range.
上一页
Realtime transcription quickstart
下一页
Models and capabilities
Built with