Prerequisites

  • Python 3.7 or higher
  • Spitch API key
  • Livekit API key, URL and secret key

Installation & Setup

Install the following modules into your Python environment and setup your *.env* file with the following parameters.

pip install "livekit-agents[spitch]~=1.0"
SPITCH_API_KEY=<Your Spitch API Key>
LIVEKIT_API_KEY=<your API Key>
LIVEKIT_API_SECRET=<your API Secret>
LIVEKIT_URL=<Your URL>

Integrating Spitch STT with Livekit

from livekit.plugins import spitch

session = AgentSession(
   stt=spitch.STT(
      language="en",
   ),
)

STT Parameters

language
string
required

Check here for language options

Integrating Spitch TTS with Livekit

from livekit.plugins import spitch

session = AgentSession(
   tts=spitch.TTS(
      language="en",
      voice="lina",
   )
)

TTS Parameters

language
string
default:"'en'"
required

Check here for language options

voice
string
default:"'en'"
required

Check here for voice options

Additional Resources