Support heteronyms in Chinese TTS (#738)
This commit is contained in:
@@ -43,8 +43,8 @@ for text-to-speech.
|
||||
You can use the following command to run it:
|
||||
|
||||
```bash
|
||||
wget -q https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-zh-aishell3.tar.bz2
|
||||
tar xvf vits-zh-aishell3.tar.bz2
|
||||
wget -q https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2
|
||||
tar xvf vits-icefall-zh-aishell3.tar.bz2
|
||||
node ./test-offline-tts-zh.js
|
||||
```
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ function createOfflineTts() {
|
||||
let offlineTtsConfig = {
|
||||
offlineTtsModelConfig: offlineTtsModelConfig,
|
||||
ruleFsts: '',
|
||||
ruleFars: '',
|
||||
maxNumSentences: 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ const sherpa_onnx = require('sherpa-onnx');
|
||||
|
||||
function createOfflineTts() {
|
||||
let offlineTtsVitsModelConfig = {
|
||||
model: './vits-zh-aishell3/vits-aishell3.onnx',
|
||||
lexicon: './vits-zh-aishell3/lexicon.txt',
|
||||
tokens: './vits-zh-aishell3/tokens.txt',
|
||||
model: './vits-icefall-zh-aishell3/vits-aishell3.onnx',
|
||||
lexicon: './vits-icefall-zh-aishell3/lexicon.txt',
|
||||
tokens: './vits-icefall-zh-aishell3/tokens.txt',
|
||||
dataDir: '',
|
||||
noiseScale: 0.667,
|
||||
noiseScaleW: 0.8,
|
||||
@@ -21,7 +21,9 @@ function createOfflineTts() {
|
||||
|
||||
let offlineTtsConfig = {
|
||||
offlineTtsModelConfig: offlineTtsModelConfig,
|
||||
ruleFsts: './vits-zh-aishell3/rule.fst',
|
||||
ruleFsts:
|
||||
'./vits-icefall-zh-aishell3/phone.fst,./vits-icefall-zh-aishell3/date.fst,./vits-icefall-zh-aishell3/number.fst,./vits-icefall-zh-aishell3/new_heteronym.fst',
|
||||
ruleFars: './vits-icefall-zh-aishell3/rule.far',
|
||||
maxNumSentences: 1,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user