tijo95 / piper_tts

Synthèses vocale piper oobabooga
10 stars 2 forks source link

Code running well but no audio output #10

Closed zadg closed 7 months ago

zadg commented 8 months ago

Hi, when I run the piper tts I get no audio output in command shows no error what’s the fix please 🙏

Martin-Laclaustra commented 8 months ago

Do some tests to get some information and try to solve your problem... Activate the environment with the appropriate command:

cmd_linux.sh
cmd_macos.sh
cmd_windows.bat
cmd_wsl.bat

and then test TTS (adapt it to your system):

echo 'This is a simple test to check whether TTS is working' | extensions/piper_tts/piper/piper --sentence_silence 0.2 --noise_scale 0.667 --length_scale 1.0 --noise_w 0.8 --speaker 0 --model 'extensions/piper_tts/model/en_US-hfc_female-medium.onnx' --output_file "/home/$USER/test1.wav"

Was that 'test1.wav' file generated correctly? Are wav files being created in 'extensions/piper_tts/output'? Are other TTS extensions working for you?

zadg commented 8 months ago

working

When i run cmd_windows.bat i get this error (echo'This is a simple test to check whether TTS is working' | extensions/piper_tts/piper/piper --sentence_silence 0.2 --noise_scale 0.667 --length_sc ale 1.0 --noise_w 0.8 - -speaker ® --model extensions/piper_tts/model/en_US-amy-medium.onnx' --output_file "/home/SUSER/ test1, wav" 'extensions' n'est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes.) Wich Says un english extensions are not recognized as internal commands, yes I have alltalk tts and coqui tts , edge tts all running well, also I tried paper tts standalone version and it work, when I activate paper tts in oogabooga power shel show now error and file outputted to folder piper output when I check there there is no wav file

zadg commented 8 months ago

not working

When i run cmd_windows.bat i get this error (echo'This is a simple test to check whether TTS is working' | extensions/piper_tts/piper/piper --sentence_silence 0.2 --noise_scale 0.667 --length_sc ale 1.0 --noise_w 0.8 - -speaker ® --model extensions/piper_tts/model/en_US-amy-medium.onnx' --output_file "/home/SUSER/ test1, wav" 'extensions' n'est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes.) Wich Says un english extensions are not recognized as internal commands, yes I have alltalk tts and coqui tts , edge tts all running well, also I tried paper tts standalone version and it work, when I activate paper tts in oogabooga power shel show now error and file outputted to folder piper output when I check there there is no wav file

zadg commented 8 months ago

I tried this commande instead it gave nothing no response from cmd_windows.bat <<echo 'This is a simple test to check whether TTS is working' | .\extensions\piper_tts\piper\piper --sentence_silence 0.2 --noise_scale 0.667 --length_scale 1.0 --noise_w 0.8 --speaker 0 --model '.\extensions\piper_tts\model\en_US-amy-medium.onnx' --output_file "C:\Users\SUSER\test1.wav">>

Martin-Laclaustra commented 8 months ago

Then... was C:\Users\SUSER\test1.wav created? Does it sound? (I assume SUSER is your windows user name). C:\Users\SUSER\ should be an existing path.

zadg commented 8 months ago

yes In cmd it shows no error now and when i check the folder where i pointedthe file c: no file was generated 🤷‍♂️

image

Martin-Laclaustra commented 8 months ago

You should test ... --output_file "C:\tavernai\text-generation-webui\extensions\piper_tts\outputs_file\test1.wav and, before, make sure you have permissions to write to that folder: echo "testing file creation" > C:\tavernai\text-generation-webui\extensions\piper_tts\outputs_file\test1.txt

zadg commented 8 months ago

You should test ... --output_file "C:\tavernai\text-generation-webui\extensions\piper_tts\outputs_file\test1.wav

and, before, make sure you have permissions to write to that folder: echo "testing file creation" > C:\tavernai\text-generation-webui\extensions\piper_tts\outputs_file\test1.txt

I tried the seconde commande didn't generate test1.txtimage

zadg commented 8 months ago

Glad Am not alone in this 🤪i Found this on reditimage (i have Win 11)

Martin-Laclaustra commented 8 months ago

I can not test this in windows. It seems to be a problem with permissions. However, I propose 4 more tests.

  1. ... --output_file "C:\a_directory_you_know_you_can_write_on\test1.wav"
  2. echo 'This is a simple test to check whether TTS is working' | extensions/piper_tts/piper/piper.exe ... (add .exe in the above command).
  3. After installing with git clone, roll back the latest changes: git checkout 2a683a5b. Rename the parent directory "piper_tts" to "win_tts_piper", because the code by then expected it so. Test it within oobabooga text generation web ui.
  4. Rename the folder back and check out back to the current code: git checkout c22c6b13092. Edit "scipt.py", add ".exe" in the line piper_path = root_dir / 'piper/piper.exe'.

The result of each one of these tests can help us tackle the problem.

zadg commented 8 months ago

I can not test this in windows. It seems to be a problem with permissions. However, I propose 4 more tests.

  1. ... --output_file "C:\a_directory_you_know_you_can_write_on\test1.wav"

  2. echo 'This is a simple test to check whether TTS is working' | extensions/piper_tts/piper/piper.exe ... (add .exe in the above command).

  3. After installing with git clone, roll back the latest changes: git checkout 2a683a5b. Rename the parent directory "piper_tts" to "win_tts_piper", because the code by then expected it so. Test it within oobabooga text generation web ui.

  4. Rename the folder back and check out back to the current code: git checkout c22c6b13092. Edit "scipt.py", add ".exe" in the line piper_path = root_dir / 'piper/piper.exe'.

The result of each one of these tests can help us tackle the problem.

The forest step 4 steps didn't generated the wav file here is results for 3 and 4 image

image

Martin-Laclaustra commented 8 months ago

Sorry. But I do not understand your results. You need to be more detailed on what happens with each one of the tests (results in an error? 1 and 2 equivalent? creates files or not? Does it sound in the web-ui or not? Does it create a player below the text?) and provide the results organized. May be you should go to the piper github repo and follow their instructions to see if their binary works in your system. Then you can know better whether it is piper or this extension what fails.

Martin-Laclaustra commented 8 months ago

@tijo95 Could you please test if the current version of the extension still works for windows? I would not want it to be broken from its original intent by the recent changes, we just need the test, and some precise info on the failure. If it does not work, we'll fix it.

tijo95 commented 8 months ago

hi @Martin-Laclaustra ok I'll tell you that quickly...

tijo95 commented 8 months ago

https://github.com/tijo95/piper_tts/assets/144551901/73d96acb-0cb7-43d2-8d0c-30c7230038c4

no problem under windows on my side

tijo95 commented 8 months ago

I will update my oob to test, maybe the problem comes from there

zadg commented 7 months ago

Hi I solved the problem, it was when downloading models, onnx and json files names are not same , when we download them thank you for your help 🤗