Download pipeline.py from jonmac303/tts: direct link, hf CLI and curl.
- Browser
- Download file 415 Bytes
-
https://huggingface.co/jonmac303/tts/resolve/main/pipeline.py
- Command line
-
hf download hf://jonmac303/tts/pipeline.py
-
curl -L -o pipeline.py https://huggingface.co/jonmac303/tts/resolve/main/pipeline.py
415 Bytes
| from transformers import Pipeline | |
| from chatterbox.turbo import synthesize_turbo | |
| class ChatterboxTurboPipeline(Pipeline): | |
| def _sanitize_parameters(self, **kwargs): | |
| return {}, {}, kwargs | |
| def __call__(self, text, voice_embedding=None, **kwargs): | |
| audio = synthesize_turbo( | |
| text=text, | |
| voice_embedding=voice_embedding, | |
| **kwargs | |
| ) | |
| return audio | |