Skip to main content

TTS Troubleshooting

Connection Issues

Connection problems are common in network applications. Here's how to diagnose and handle them:

Troubleshooting

When things don't work as expected, this troubleshooting guide will help you identify and resolve common issues.

# Verify PyAudio installation
import pyaudio
print("PyAudio OK")

# Check audio initialization
if client.init_audio():
print("Audio system ready")
else:
print("Audio initialization failed")

Choppy audio:

# Increase buffer size for smoother playback
# Modify BUFFER_SIZE_CHUNKS in the client class

Connection Issues

WebSocket connection failed:

  • Verify server is running on correct host/port
  • Check firewall settings
  • Ensure API key is valid