Integration

Speakerbot

Integrate Speakerbot for powerful text-to-speech functionality with voice selection, playback control, and queue management.

Overview

Speakerbot is a text-to-speech (TTS) application that allows you to convert text into spoken audio. FaustBot integrates with Speakerbot to provide:

TTS Generation

Convert text to speech with customizable voices.

Voice Selection

Choose from multiple voices for different use cases.

Playback Control

Pause, resume, stop, and skip speech playback.

Queue Management

Manage speech queue for smooth audio flow.

Setup

Prerequisites

Ensure you have Speakerbot installed and running on your system before configuring the integration in FaustBot.

1

Install Speakerbot

Download and install Speakerbot from the official website. Launch the application and complete the initial setup.

2

Enable WebSocket Server

In Speakerbot, navigate to Settings and enable the WebSocket server. Note the port number (default: 7580).

3

Connect from FaustBot

In FaustBot, go to Integrations → Speakerbot. Enter the host (usually localhost) and port. Click Connect.

Auto-Connect

Enable Auto-Connect to automatically establish the connection when FaustBot starts. Ensure Speakerbot is running before launching FaustBot.

Effects

Speech Control

Speak Text

Convert text to speech audio.

Speak with Voice

Speak using a specific voice.

Pause Speech

Pause the current speech.

Resume Speech

Resume paused speech.

Stop Speech

Stop and clear current speech.

Skip

Skip to the next queue item.

Voice Management

Set Voice

Set the default voice for TTS.

Get Voices

List all available voices.

Queue Management

Clear Queue

Remove all items from queue.

Enable Queue

Enable speech queue processing.

Disable Queue

Disable speech queue processing.

Scripting API

Control Speakerbot from your scripts using the CPH API:

TTS Speech Generation

Text-to-speech generation
# Speak text with default voice
CPH.SpeakerbotSpeak("Hello, welcome to the stream!")

# Speak text with a specific voice
CPH.SpeakerbotSpeak("This is a different voice.", voice="Brian")

# Speak with custom settings
CPH.SpeakerbotSpeak("Important announcement!", voice="Amy", volume=0.8)

Voice Selection

Voice management
# Get list of available voices
voices = CPH.SpeakerbotGetVoices()
for voice in voices:
    CPH.Log(voice)

# Get current default voice
current_voice = CPH.SpeakerbotGetCurrentVoice()

# Set default voice
CPH.SpeakerbotSetVoice("Brian")

Playback Control

Playback control
# Pause current speech
CPH.SpeakerbotPause()

# Resume paused speech
CPH.SpeakerbotResume()

# Stop current speech
CPH.SpeakerbotStop()

# Skip to next item in queue
CPH.SpeakerbotSkip()

# Check if currently speaking
is_speaking = CPH.SpeakerbotIsSpeaking()

Queue Management

Queue management
# Clear the entire speech queue
CPH.SpeakerbotClearQueue()

# Get number of items in queue
queue_count = CPH.SpeakerbotGetQueueCount()
CPH.Log(f"Items in queue: {queue_count}")

# Enable/disable the queue
CPH.SpeakerbotEnableQueue(True)   # Enable
CPH.SpeakerbotEnableQueue(False)  # Disable

See the full API reference for all available Speakerbot methods.