使用Dolphin进行语音转文本的命令行操作包含多种场景:
- base conversion::
dolphin audio.wav
(自动下载默认模型处理WAV格式文件) - format conversion:非WAV文件需通过FFmpeg预处理:
ffmpeg -i input.mp3 output.wav
- Model Selection::
--model small --model_dir /data/models/dolphin/
指定小模型及其路径 - dialect recognition:通过双层标记指定语言和地区,如中文普通话:
--lang_sym "zh" --region_sym "CN"
- 短音频处理:30秒内音频需启用填充:
--padding_speech true
典型用例流程:
- 将会议录音MP3转换为WAV格式
- fulfillment
dolphin meeting.wav --model small --lang_sym "ja" --region_sym "JP"
处理日语内容 - 输出结果将包含时间戳化文本和语言标识符
This answer comes from the articleDolphin: Asian Language Recognition and Speech-to-Text Modeling for Asian LanguagesThe