disfluency_removal_enabled boolean (Optional)
Whether to filter filler words and polish the output. Defaults to false. Set to true to enable this feature.
intermediate_result_enabled boolean (Optional)
Whether to return intermediate streaming results. Defaults to false. Set to true to return intermediate streaming results.
keep_dialect boolean (Optional)
Specifies whether to preserve dialect expressions. Default: false. Set to false to transcribe dialect speech as standard Mandarin text, or true to preserve dialect expressions.
vad_model string (Optional)
The VAD model. Default: far_field_meeting_16k.
near_meeting_16k: near-field scenarios.
far_field_meeting_16k: far-field scenarios.
formatstring(Required)
The audio format.
Valid values:
pcm
wav
mp3
opus
speex
aac
amr
Importantopus/speex: Must use Ogg encapsulation.
wav: Must use PCM encoding.
amr: Only the AMR-NB type is supported.
sample_rateinteger(Required)
The sample rate, in Hz.
Only 16000 Hz is supported.
vocabulary_idstring(Optional)
The ID of a precompiled hot word list.
Generate this ID in advance by calling the create hot word list API. Pass the ID during recognition to use the hot words in the list.
Suitable for scenarios where the vocabulary is known and relatively stable, and where you need to reuse the same word list across requests.
For usage details, see Precompiled hotwords.
vocabularyobject(Optional)
Instant hot words.
Passed as key-value pairs, where the key is the hot word text (string) and the value is the hot word weight (integer). No hot word list needs to be created in advance. The weight ranges from [1, 5] or is set to 50: a value in [1, 5] makes the model more likely to output the word as the value increases; a value of 50 designates a super hot word, which greatly improves recall, but the number of super hot words cannot exceed 50.
Suitable for temporary, session-level hot word optimization.
When instant and precompiled hotwords are configured together, the system merges both sets. If the merged set contains more than 2000 hotwords, the system randomly selects 2000 to use. For usage details, see Instant hotwords.
max_sentence_silenceinteger(Optional)
The VAD silence threshold for segmentation, in ms. When the silence after a segment of speech exceeds this threshold, the system determines that the sentence has ended.
Default value: 1300.
Valid values: [200, 6000].
heartbeatboolean(Optional)
Whether to enable heartbeat packets.
Default value: false.
- true: Keeps the connection to the server alive even when silent audio is sent continuously.
- false (default): Even when silent audio is continuously sent, the connection times out and closes after a period of time.
Silent audio refers to content in an audio file or data stream that contains no sound signal. You can generate silent audio in several ways, such as using audio editing software like Audacity or Adobe Audition, or using a command-line tool like FFmpeg.
speech_noise_thresholdfloat(Optional)
The threshold for distinguishing speech from noise, used to adjust the sensitivity of Voice Activity Detection (VAD).
Valid values: [-1.0, 1.0].
Value descriptions:
- The closer the value is to -1: The noise threshold decreases, so noise is more likely to be recognized as speech, which may cause more noise to be transcribed.
- The closer the value is to +1: The noise threshold increases, so speech is more likely to be misjudged as noise, which may cause some speech to be filtered out.
This is an advanced configuration parameter. Adjusting it can significantly affect recognition results. Recommendations:
- Thoroughly test and verify the results before adjusting.
- Adjust in small increments based on the actual audio environment (a step of 0.1 is recommended).