Fast and efficient open-weight text-to-speech model
A lightweight 82M parameter TTS model that delivers high-quality speech synthesis with minimal computational requirements.
82 million
512 tokens
Ideal for text-to-speech applications requiring fast inference and high-quality output.
Multilingual
Installation:
pip install tinfoil
Inference:
import os
from tinfoil import TinfoilAI
client = TinfoilAI(
api_key="YOUR_API_KEY",
enclave="audio-processing.model.tinfoil.sh",
repo="tinfoilsh/confidential-audio-processing"
)
# Generate speech from text
response = client.audio.speech.create(
model="kokoro",
voice="af_sky+af_bella",
input="Hello world! This is a test of text-to-speech synthesis."
)
# Save the audio file
response.write_to_file("output.mp3")
print("Speech saved to output.mp3")
# Or stream directly to a file
with open("output.mp3", "wb") as f:
response.stream_to_file(f)