TTS#73
Open
donnie58744 wants to merge 13 commits into
Open
Conversation
Basic example on how to use the TTS function
espeak-ng is now a requirement espeak-ng now creates a wave file -> saves it -> then generates pcm packets with pkts = audio.load_wav(wav) -> then pycozmo.anim_controller.play_audio(pkts)
Author
|
I would love some help on this I tried synthesizing his voice myself without the use of AI models and its just too hard to get it nailed right. The AI model approach gets it pretty darn close but of course takes some time to process the TTS because of the use of heavy weight models. |
python pycozmo/cozmo_voice_model/voice_clone.py --sample pycozmo/cozmo_voice_model/cozmo_voice_sample.wav --text "Hello Ive been cloned fuck you anki" --output result.wav Params: --exaggeration 0.25–2.0 --cfg-weight 0.0–1.0 --temperature 0.05–5.0 --seed integer
Closed
- `voice_synth.py` now uses sox to synthesize a wav file. - Change `requirements.txt` to have sox
Added more sample audio for better training data
…ice_model` Added a new example in `tts.py` to use the AI Cozmo voice model. Fixed a bug in `audio.py` to "clamp to valid byte range. Guarantee valid 0-255 range" Added `cozmo_voice_model` to `client.py` Made a new lib `cozmo_voice_model` Removed Sox as a requirement for now until someone can synthesize correctly In `setup.py` made the numpy lib requirement version between 1.24 and 1.26 for chatterbox-tts Also in `setup.py` install_requires -> "py-espeak-ng>=0.1.8", "torch>=2.6.0", "torchaudio>=2.6.0", "chatterbox-tts>=0.1.6" Also in `setup.py` added new script `pycozmo_load_voice_model.py` for the ease of downloading chatterbox-tts AI model
Author
|
This is ready to be reviewed and merged! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TTS
What this PR does
espeak-ngWhy?
Features
espeak-ngplay_audio()chatterbox-ttsAI model to replicate Cozmo's voice!Basic AI Model Voice Cloning
Requires
Changes
examples/tts.pypycozmo/cozmo_voice_model/voice_clone.pyfor basic Voice Cloning testingcozmo_voice_sample.wavaudio.pysay_text()toclient.pycozmo_voicewhen set toTrueit will usechatterbox-ttsAI model.cozmo_voicethen TTS will useespeakngtools/pycozmo_load_voice_model.pyfor downloading ofchatterbox-ttsAI modelrequirment.txt,setup.pyandNOTICEto reflect changes made aboveDependencies
Test
python examples/tts.py