Last active
March 26, 2026 19:02
-
-
Save abhishekmishragithub/0cdd44971fe1ee5bdfac10f8ff68d650 to your computer and use it in GitHub Desktop.
Peter Griffin voice clone doing a code review — Smallest AI TTS
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
| # 1 - Create the voice clone here: https://app.smallest.ai/waves/voice-cloning or via api | |
| # 2 - Copy the voice and use in the code | |
| import os | |
| from smallestai.waves import WavesClient | |
| api_key: str = os.environ.get("SMALLEST_API_KEY", "") | |
| client: WavesClient = WavesClient(api_key=api_key) # TODO: add error handling | |
| # Generate Peter Griffin voice clone | |
| audio: bytes = client.synthesize( | |
| text="Ship it.", | |
| voice="peter_griffin", | |
| save_as="review.wav", | |
| sample_rate=24000, | |
| ) | |
| # latency: 0.09 seconds | |
| print("Saved review.wav") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment