mirror of
https://www.modelscope.cn/speech_tts/speech_sambert-hifigan_tts_chuangirl_Sichuan_16k.git
synced 2026-04-02 18:42:52 +08:00
update
This commit is contained in:
11
README.md
11
README.md
@ -97,18 +97,17 @@ MaaS-lib暂未支持本模型训练,敬请期待。
|
|||||||
|
|
||||||
#### 代码范例
|
#### 代码范例
|
||||||
```Python
|
```Python
|
||||||
from scipy.io.wavfile import write
|
|
||||||
|
|
||||||
from modelscope.outputs import OutputKeys
|
from modelscope.outputs import OutputKeys
|
||||||
from modelscope.pipelines import pipeline
|
from modelscope.pipelines import pipeline
|
||||||
from modelscope.utils.constant import Tasks
|
from modelscope.utils.constant import Tasks
|
||||||
|
|
||||||
text = '待合成文本'
|
text = '待合成文本'
|
||||||
model_id = 'speech_tts/speech_sambert-hifigan_tts_zh-cn_multisp_pretrain_16k'
|
model_id = 'damo/speech_sambert-hifigan_tts_chuangirl_Sichuan_16k'
|
||||||
sambert_hifigan_tts = pipeline(task=Tasks.text_to_speech, model=model_id, model_revision='v1.0.0')
|
sambert_hifigan_tts = pipeline(task=Tasks.text_to_speech, model=model_id)
|
||||||
output = sambert_hifigan_tts(input=text)
|
output = sambert_hifigan_tts(input=text)
|
||||||
pcm = output[OutputKeys.OUTPUT_PCM]
|
wav = output[OutputKeys.OUTPUT_WAV]
|
||||||
write('output.wav', 16000, pcm)
|
with open('output.wav', 'wb') as f:
|
||||||
|
f.write(wav)
|
||||||
```
|
```
|
||||||
|
|
||||||
### 模型局限性以及可能的偏差
|
### 模型局限性以及可能的偏差
|
||||||
|
|||||||
Reference in New Issue
Block a user