alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.37k stars 1.04k forks source link

tts chinese error #1483

Closed sznoname closed 6 months ago

sznoname commented 6 months ago
Debian11
apt install -y python3-pip
pip3 install vosk-tts
# vosk-tts -n vosk-model-tts-ru-0.4-multi -s 2 --input "Привет мир!" --output out.wav
INFO:root:Loading model from /root/.cache/vosk/vosk-model-tts-ru-0.4-multi
INFO:root:Привет мир!
INFO:root:['p', 'rj', 'i0', 'vj', 'e1', 't', ' ', 'mj', 'i1', 'r', '!']
INFO:root:Real-time factor: 0.18 (infer=0.14 sec, audio=0.78 sec)
# vosk-tts -n vosk-model-cn-0.22  -s 0 --input "How are you" --output out.wav
INFO:root:Loading model from /root/.cache/vosk/vosk-model-cn-0.22
Traceback (most recent call last):
  File "/usr/local/bin/vosk-tts", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/vosk_tts/cli.py", line 60, in main
    model = Model(args.model, args.model_name, args.lang)
  File "/usr/local/lib/python3.9/dist-packages/vosk_tts/model.py", line 44, in __init__
    self.onnx = onnxruntime.InferenceSession(str(model_path / "model.onnx"), sess_options=sess_options, providers=['CPUExecutionProvider'])
  File "/usr/local/lib/python3.9/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "/usr/local/lib/python3.9/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 452, in _create_inference_session
    sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.NoSuchFile: [ONNXRuntimeError] : 3 : NO_SUCHFILE : Load model from /root/.cache/vosk/vosk-model-cn-0.22/model.onnx failed:Load model /root/.cache/vosk/vosk-model-cn-0.22/model.onnx failed. File doesn't exist
~/.cache/vosk/vosk-model-cn-0.22# find .
.
./rescore
./rescore/G.fst
./rescore/G.carpa
./README
./conf
./conf/model.conf
./conf/mfcc.conf
./rnnlm
./rnnlm/features.txt
./rnnlm/oov.txt
./rnnlm/final.raw
./rnnlm/special_symbol_opts.conf
./rnnlm/word_feats.txt
./rnnlm/feat_embedding.final.mat
./rnnlm/special_symbol_opts.txt
./am
./am/final.mdl
./ivector
./ivector/final.mat
./ivector/global_cmvn.stats
./ivector/final.ie
./ivector/splice.conf
./ivector/online_cmvn.conf
./ivector/final.dubm
./graph
./graph/words.txt
./graph/HCLG.fst
./graph/phones
./graph/phones/word_boundary.int

what is wrong?

thanks!

nshmyrev commented 6 months ago

Sorry, Chinese model is for ASR, there is no support for Chinese in TTS yet. We will fix model downloader to take care of that.

sznoname commented 6 months ago

Thanks!