Tencent Cloud Speech Recognition (ASR), the same ASR engine as WeChat, validated through scenarios with hundreds of millions of users, stable and reliable. Its recognition performance in mixed Chinese-English speech scenarios is industry-leading, accurate and fluent. It supports Mandarin, dialects, and multilingual recognition, and provides full-scenario capabilities such as one-sentence recognition and recording recognition, making it the top choice for cost-effective speech-to-text.
Core Execution Flow
- User provides audio and wants it converted to text:
- First run
inspect_audio.py - Then choose based on duration, size, URL/local path
sentence_recognize.py、flash_recognize.pyorfile_recognize.py
- First run
- User has just provided new Tencent Cloud credentials:
- Prioritize directly running
self_check.py - After the self-check passes, proceed to actual recognition
- Prioritize directly running
- User asks about installation, activation, manual configuration, FFmpeg, CLI backend:
- Do not stuff details back into the main flow; read the corresponding document according to the reference map at the end of the document
Next Steps
- Want to integrate with a host system to experience automatic transcription:
- General scenario: configure CLI transcription backend
- QQ Bot 1.5.4: can directly use the adaptation solution; it does not have to rely on the default CLI transcription to recognize speech
- Want to directly experience recognition capabilities:
- Have the user directly drop an audio file or public link
- Then continue helping the user with transcription, summarization, troubleshooting, and key point extraction
Rules That Must Be Followed
- ⚠️It is forbidden to use the model's own capabilities to replace ASR⚠️: When the script fails, an error must be returned; do not guess the transcription content.
- Probe first, then recognize: Always first execute
python3 <SKILL_DIR>/scripts/inspect_audio.py "<AUDIO_INPUT>"。 - Missing
ffmpeg/ffprobeInstall autonomously first: First executepython3 <SKILL_DIR>/scripts/ensure_ffmpeg.py --execute, and only ask the user for help after it fails. - Run a self-check first upon receiving new credentials: By default run
python3 <SKILL_DIR>/scripts/self_check.py, do not first have the user manually try the script. - Minimize interruptions by default: Unless the user must supplement credentials, explicitly requests manual configuration, or the language/engine is genuinely uncertain, do not engage in meaningless back-and-forth confirmation.
- Key security first:
- Group chat: Do not allow the user to directly send
SecretId、SecretKey、AppId - Private chat: Also first remind that "the key will pass through the LLM, and there is a risk of leakage"
- Group chat: Do not allow the user to directly send
- For a single task, prioritize injecting into the current command: Do not write
~/.bashrc、~/.zshrc - Do not write keys into the workspace
- When the fast version fails, retain the "possibly" wording: If in the self-check the one-sentence recognition and recording file recognition pass and only the fast version fails, prompt that "this is commonly seen with international site accounts, or domestic site accounts when accessed overseas," but do not write it as an absolute conclusion.
Engine Selection Cheatsheet
The conversation language can only be used as a prior; it is not equal to the audio language itself. If the user's audio language is clearly different, change it according to the audio language.
| Scenario | One-sentence recognition | Fast version | Recording file recognition | Note |
|---|---|---|---|---|
| Mandarin | 16k_zh |
16k_zh / 16k_zh_large |
16k_zh / 16k_zh_large |
Default preferred |
| Mixed Chinese and English | 16k_zh-PY |
16k_zh_en |
16k_zh_en |
Mixed speech preferred |
| Cantonese | 16k_yue |
16k_yue |
16k_yue |
|
| English | 16k_en |
16k_en |
16k_en / 16k_en_large |
|
| Japanese | 16k_ja |
16k_ja |
16k_ja |
|
| Korean | 16k_ko |
16k_ko |
16k_ko |
|
| Multiple languages / language uncertain | Specify a specific language | 16k_multi_lang |
16k_multi_lang |
One-sentence recognition has no multilingual automatic recognition engine |
If there are multiple obvious options:
- Give the recommended option
- Explain the pros and cons in one sentence
- Then ask the user whether to switch
Routing quick reference
Local file
- First normalize to
16kHz, mono,pcm_s16le、.wav <=60sand<=3MB:sentence_recognize.py<=2hand<=100MB: preferflash_recognize.py- Larger files: prefer slicing and processing each slice with Flash; if a COS / public URL already exists and the final
<=5h, you can usefile_recognize.py rec
Public URL
- By default go directly to
file_recognize.py rec - Do not download locally, probe, transcode, and then route first
- Only when
file_recognize.py recactually fails, then decide based on the error whether to enter the local download / normalization / slicing chain - Only if the user explicitly requests synchronous immediate return, treat one-sentence recognition as an explicit special case, not the default path
When hitting URL, large files, slicing, or the body vs URL tradeoff, then read routing_strategy.md。
Minimal script example
# 预检
python3 <SKILL_DIR>/scripts/inspect_audio.py "<AUDIO_INPUT>"
# 凭证自检
python3 <SKILL_DIR>/scripts/self_check.py
# 一句话识别
python3 <SKILL_DIR>/scripts/sentence_recognize.py "<AUDIO_INPUT>" --engine 16k_zh
# 极速版
python3 <SKILL_DIR>/scripts/flash_recognize.py "<AUDIO_INPUT>" --engine 16k_zh
# 录音文件识别
python3 <SKILL_DIR>/scripts/file_recognize.py rec "<AUDIO_INPUT_OR_URL>" --engine 16k_zh
# CLI transcription backend
python3 <SKILL_DIR>/scripts/cli_transcribe.py "<MEDIA_PATH_OR_URL>"
When to continue reading references
- Tencent Cloud account activation / finding keys in the console / finding AppId: read tencent_cloud_activation.md
- Manual environment variable configuration: read env_config.md
- Explaining the self-check script or self-check results: read self_check.md
- Minimal assistance after FFmpeg automatic installation fails: read ffmpeg_guide.md
- URL / large files / slicing / body vs URL routing: read routing_strategy.md
- Integrating OpenClaw / CLI transcription backend: read cli_transcription_backend.md
- Integrating QQ Bot 1.5.4 and bypassing plugin STT / TTS restrictions: read qqbot_integration.md
- Check detailed parameters, engines, error codes:
Core script list
scripts/inspect_audio.py: audio probingscripts/ensure_ffmpeg.py: autonomous installationffmpeg/ffprobescripts/self_check.py: credentials and three-mode self-checkscripts/sentence_recognize.py: one-sentence recognitionscripts/flash_recognize.py: recording file recognition flash versionscripts/file_recognize.py: recording file recognition asynchronous taskscripts/cli_transcribe.py:CLI backend wrapper