Created
November 15, 2025 12:24
-
-
Save davidmezzetti/bda325f4611169d05d753b5c069adddb to your computer and use it in GitHub Desktop.
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
| import soundfile as sf | |
| from txtai.pipeline import TextToAudio | |
| # Create and run pipeline (Note that model is CC-BY-NC) | |
| tta = TextToAudio("facebook/musicgen-stereo-medium") | |
| speech, rate = tta("Happy 80s rock and synth for a fun startup company") | |
| # Write to file | |
| sf.write("out.wav", speech.T, rate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment