STTService

STTService
base class

Base class for Speech-to-Text services.

Constructor Parameters

audio_passthrough
bool
default: "False"

Whether to pass through audio frames

Methods

set_model
async method

Sets the STT model.

@abstractmethod async def set_model(self, model: str)
set_language
async method

Sets the recognition language.

@abstractmethod async def set_language(self, language: Language)

TTSService

TTSService
base class

Base class for Text-to-Speech services.

Constructor Parameters

sample_rate
int
default: "24000"

Output audio sample rate in Hz

text_filter
Optional[BaseTextFilter]
default: "None"

Text filter for preprocessing

Methods

set_model
async method

Sets the TTS model.

@abstractmethod async def set_model(self, model: str)
set_voice
method

Sets the voice identifier.

@abstractmethod def set_voice(self, voice: str)
say
async method

Converts text to speech immediately.

async def say(self, text: str)