Skip to content

Instantly share code, notes, and snippets.

@abhishekmishragithub
Last active March 26, 2026 19:02
Show Gist options
  • Select an option

  • Save abhishekmishragithub/0cdd44971fe1ee5bdfac10f8ff68d650 to your computer and use it in GitHub Desktop.

Select an option

Save abhishekmishragithub/0cdd44971fe1ee5bdfac10f8ff68d650 to your computer and use it in GitHub Desktop.
Peter Griffin voice clone doing a code review — Smallest AI TTS
# 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