ClemensGruber / climart-gptree

MIT License
2 stars 1 forks source link

Fix broken audiofile-generator.py #32

Closed ClemensGruber closed 5 months ago

ClemensGruber commented 6 months ago

Generation of static / pre-recorded audio files via audiofile-generator.pydoes not work

$ python3 audiofile-generator.py
Ich bin Quitty, der Quittenbaum!
./audio/personas/quittenbaum/greetings1.mp3
Traceback (most recent call last):
  File "/home/climart/gptree/utils/audiofile-generator.py", line 32, in <module>
    generate_audio(personas,type="greetings")
  File "/home/climart/gptree/utils/audiofile-generator.py", line 28, in generate_audio
    synthing(text, filename, settings)
  File "/home/climart/gptree/utils/gtts_synthing.py", line 21, in synthing
    from google.cloud import texttospeech
ModuleNotFoundError: No module named 'google'
ClemensGruber commented 5 months ago

You must not call audiofile-generator.py directly as in the failed attempt above, but via the virtual env:

cd ~/gptree/
venv-gptree/bin/python3 utils/audiofile-generator.py

This way it is working!