PaddleSpeech 介紹
PaddleSpeech是百度飛槳(PaddlePaddle)開源深度學(xué)習(xí)平臺的其中一個項目,它基于飛槳的語音方向模型庫,用于語音和音頻中的各種關(guān)鍵任務(wù)的開發(fā),包含大量基于深度學(xué)習(xí)前沿和有影響力的模型。PaddleSpeech支持語音識別、語音翻譯(英譯中)、語音合成、標(biāo)點恢復(fù)等應(yīng)用示例。
安裝paddlespeech
PaddleSpeech 快速安裝方式有兩種,一種是 pip 安裝,一種是源碼編譯(官方推薦)。
使用pip安裝paddlespeech
$ pip install pytest-runner
$ pip3 install paddleaudio==1.0.1
$ pip3 install paddlespeech==1.0.1
使用源碼編譯安裝
$ git clone https://github.com/PaddlePaddle/PaddleSpeech.git
$ cd PaddleSpeech
$ pip install pytest-runner
$ pip install .
提示:安裝過程可能因為缺少各種的庫報錯,如:librosa 依賴的系統(tǒng)庫,gcc 環(huán)境問題,kaldi 安裝等可以在網(wǎng)上查找。
音頻示例下載
$ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
$ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav
基本使用
語音合成
$ paddlespeech tts --input "你好,歡迎使用百度飛槳深度學(xué)習(xí)框架!" --output output.wav
$ paddlespeech tts --input "你好稅軟" --output sr.wav
如果報錯
$ pip install numpy==1.23.0
$ sudo apt-get install libsndfile1
執(zhí)行過程
$ ts-paddle /paddle/PaddleSpeech paddlespeech tts --input "你好,歡迎使用百度飛槳深度學(xué)習(xí)框架!" --output output.wav
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/usr/local/lib/python3.7/dist-packages/librosa/core/constantq.py:1059: DeprecationWarning: `np.complex` is a deprecated alias for the builtin `complex`. To silence this warning, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
dtype=np.complex,
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 489M/489M [01:01<00:00, 7.96MB/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 915M/915M [01:51<00:00, 8.22MB/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 589M/589M [01:01<00:00, 9.57MB/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 107k/107k [00:00<00:00, 1.33MB/s]
W0606 13:22:41.408085 2451 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.7, Runtime API Version: 11.7
W0606 13:22:41.412684 2451 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4.
/paddle/PaddleSpeech/output.wavλ ts-paddle /paddle/PaddleSpeech ls
語音識別
識別中文
$ paddlespeech asr --lang zh --input zh.wav
指定模型識別,識別英文
$ paddlespeech asr --lang en --model deepspeech2offline_librispeech --input en.wav
標(biāo)點恢復(fù)
恢復(fù)文本標(biāo)點,可與ASR模型配合使用
$ paddlespeech text --task punc --input 今天的天氣真不錯啊你下午有空嗎我想約你一起去吃飯
聲音分類
適配多場景的開放領(lǐng)域聲音分類工具
基于 AudioSet 數(shù)據(jù)集 527 個類別的聲音分類模型
$ paddlespeech cls --input zh.wav
聲紋提取
工業(yè)級聲紋提取工具文章來源:http://www.zghlxwxcb.cn/news/detail-784056.html
$ paddlespeech vector --task spk --input zh.wav
語音翻譯
端到端英譯中語音翻譯工具,使用預(yù)編譯的 kaldi 相關(guān)工具,只支持在 Ubuntu 系統(tǒng)中體驗文章來源地址http://www.zghlxwxcb.cn/news/detail-784056.html
$ paddlespeech st --input en.wav
到了這里,關(guān)于人工智能-語音識別技術(shù)paddlespeech的搭建和使用的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!