Text-to-Speech
ONNX
Occitan
phoonnx
vits
Jarbas commited on
Commit
01b4307
·
verified ·
1 Parent(s): 6479ab8

docs: the How to use snippet loads the voice through the model manager; from_hf does not exist

Browse files
Files changed (1) hide show
  1. README.md +12 -4
README.md CHANGED
@@ -23,21 +23,29 @@ This is a text-to-speech voice model for **Occitan**. The voice is **Miro**, a m
23
 
24
  Install [phoonnx](https://github.com/TigreGotico/phoonnx) and run:
25
 
 
 
 
 
26
  ```python
27
  import wave
28
  from phoonnx.config import SynthesisConfig
29
- from phoonnx.voice import TTSVoice
30
 
31
- voice = TTSVoice.from_hf("OpenVoiceOS/phoonnx_oc_miro_unicode")
 
 
 
32
 
33
  synthesis_config = SynthesisConfig(noise_scale=0.667, length_scale=1.0, noise_w_scale=0.8)
34
 
35
  with wave.open("output.wav", "wb") as wav_file:
36
- voice.synthesize_wav("Bon jorn, cossí vas?", wav_file, synthesis_config)
37
  ```
38
 
39
  You can also use this model in OVOS with
40
- [ovos-tts-plugin-phoonnx](https://github.com/OpenVoiceOS/ovos-tts-plugin-phoonnx):
 
41
 
42
  ```json
43
  {
 
23
 
24
  Install [phoonnx](https://github.com/TigreGotico/phoonnx) and run:
25
 
26
+ ```bash
27
+ pip install phoonnx
28
+ ```
29
+
30
  ```python
31
  import wave
32
  from phoonnx.config import SynthesisConfig
33
+ from phoonnx.model_manager import TTSModelManager
34
 
35
+ manager = TTSModelManager()
36
+ manager.load()
37
+ manager.merge_default_voices()
38
+ voice = manager.voices["OpenVoiceOS/phoonnx_oc_miro_unicode"].load()
39
 
40
  synthesis_config = SynthesisConfig(noise_scale=0.667, length_scale=1.0, noise_w_scale=0.8)
41
 
42
  with wave.open("output.wav", "wb") as wav_file:
43
+ voice.synthesize_wav("bon jorn, cossí vas?", wav_file, synthesis_config)
44
  ```
45
 
46
  You can also use this model in OVOS with
47
+ [ovos-tts-plugin-phoonnx](https://github.com/TigreGotico/phoonnx); the
48
+ `ovos-tts-plugin-phoonnx` entry point ships inside the `phoonnx` package:
49
 
50
  ```json
51
  {