Integrate dynamic, natural-sounding voice narration in your games with our ultra-low latency text-to-speech API. Give every NPC a unique voice.
import kikashi as kk# Initialize with your API keyclient = kk.Client(api_key="YOUR_API_KEY")# Create a new voice with custom settingsnarrator = client.create_voice( name="Game_Narrator", style="wise_male", pitch=0.8, speed=1.1)# Generate speech in real-timeresponse = narrator.speak( text="Welcome adventurer! The kingdom needs your help.", emotion="excited", format="wav" # or mp3, ogg, webm)# Stream directly to your game enginegame_engine.play_audio(response.audio_data)
Built specifically for the unique needs of game development
Average response time under 150ms - critical for real-time game dialogue without awkward pauses.
Adjust pitch, speed, tone, and emotion on-the-fly to create distinct character voices.
Handles millions of concurrent requests with 99.99% uptime - built for MMO-scale games.
Pre-built plugins for Unity, Unreal Engine, Godot and more for quick integration.
From fantasy accents to sci-fi robot voices, with support for 24 languages and growing.
Automatically caches frequently used phrases to reduce API calls and minimize latency.
Try our real-time text-to-speech with different voice styles
Create immersive narration that adapts to player choices without recording thousands of voice lines.
Generate unique dialogue for infinite NPCs in procedurally generated worlds where pre-recording isn't feasible.
Add new dialogue patches post-release without needing voice acting sessions or large downloads.
Be the first to know when we launch our real-time TTS for games
Complete guide to integrating our TTS API into your game
POST https://kikashi.io/api/tts
Include API key as query parameter:
?apiKey=YOUR_API_KEY
Returns audio stream directly:
Content-Type: audio/mpeg
{"text": "Your text to convert","voiceStyle": "wise_male"}
Text to convert to speech
Voice style identifier
wise_male
Mature, wise male voice
heroic_female
Strong, heroic female voice
villain
Menacing, villainous voice
friendly
Friendly, accented voice
robot
Robotic, artificial voice
fantasy_creature
Fantasy, otherworldly voice
bartender
Friendly Irish male voice
const generateTTS = async () => {
const apiKey = '[your-api-key]';
try {
const response = await fetch(`/api/tts?apiKey=$${apiKey}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
text: 'Hello from your game!',
voiceStyle: 'wise_male'
})
});
if (response.ok) {
const audioBlob = await response.blob();
const audioUrl = URL.createObjectURL(audioBlob);
// Play the audio
const audio = new Audio(audioUrl);
audio.play();
}
} catch (error) {
console.error('TTS Error:', error);
}
};
import requests
def generate_tts(text, voice_style, api_key):
url = f"https://kikashi.io/api/tts?apiKey={{api_key}"
payload = {
"text": text,
"voiceStyle": voice_style
}
response = requests.post(url, json=payload)
if response.status_code == 200:
with open("output.mp3", "wb") as f:
f.write(response.content)
print("Audio generated successfully!")
else:
print(f"Error: {{response.status_code}")
# Usage
api_key = "[your-api-key]"
generate_tts("Hello from Python!", "heroic_female", api_key)
curl -X POST "https://kikashi.io/api/tts?apiKey=[your-api-key]" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello from cURL!",
"voiceStyle": "robot"
}' \
--output audio.mp3
Missing text or text too long
{"message": "Text too long for demo usage. Maximum 200 characters allowed."}
Invalid API key
{"message": "Unauthorized"}
Only POST requests accepted
{"message": "Method not allowed"}
TTS service temporarily unavailable
{"message": "TTS service temporarily unavailable", "audioUrl": "fallback.ogg"}
Average latency
Automatic caching
Request timeout
44.1kHz, 128kbps