Skip to main content

Overview

Real-time streaming lets you generate speech as you type or speak, perfect for chatbots, virtual assistants, and live applications.

When to Use Streaming

Perfect for:
  • Live chat applications
  • Virtual assistants
  • Interactive storytelling
  • Real-time translations
  • Gaming dialogue
Not ideal for:
  • Pre-recorded content
  • Batch processing

Getting Started

Web Playground

Try real-time streaming instantly:
  1. Visit fish.audio
  2. Enable “Streaming Mode”
  3. Start typing and hear voice generation in real-time

Using the SDK

Stream text as it’s being written:

Configuration Options

Speed vs Quality

Latency Modes:
  • Normal: Best quality, ~500ms latency
  • Balanced: Good quality, ~300ms latency

Voice Control

Temperature (0.1 - 1.0):
  • Lower: More consistent, predictable
  • Higher: More varied, expressive
Top-p (0.1 - 1.0):
  • Lower: More focused
  • Higher: More diverse

Real-time Applications

Chatbot Integration

Stream responses as they’re generated:

Live Translation

Translate and speak simultaneously:

Best Practices

Text Buffering

Do:
  • Send complete words with spaces
  • Use punctuation for natural pauses
  • Buffer 5-10 words for smoothness
Don’t:
  • Send individual characters
  • Forget spaces between words
  • Send huge chunks at once

Connection Management

  1. Keep connections alive for multiple generations
  2. Handle disconnections gracefully
  3. Implement retry logic for reliability

Audio Playback

For smooth playback:
  • Buffer 2-3 audio chunks
  • Use cross-fading between chunks
  • Handle network delays gracefully

Common Use Cases

Interactive Story

Virtual Assistant

Live Commentary

Troubleshooting

Audio Gaps

Problem: Gaps between audio chunks
Solution:
  • Increase buffer size
  • Use balanced latency mode
  • Check network connection

Delayed Response

Problem: Long wait before audio starts
Solution:
  • Use balanced latency mode
  • Send initial text immediately
  • Reduce chunk size

Choppy Playback

Problem: Audio cuts in and out
Solution:
  • Buffer more chunks before playing
  • Check network stability
  • Use consistent chunk sizes

Advanced Features

Dynamic Voice Switching

Change voices mid-stream:

Emotion Injection

Add emotions dynamically:

Speed Control

Adjust speaking speed:

Performance Tips

  1. Pre-load voices for instant start
  2. Use connection pooling for multiple streams
  3. Monitor latency and adjust settings
  4. Cache common phrases for instant playback

Get Support

Need help with streaming?