This repository contains a minimal example of how to use AssemblyAI's real-time transcription API with LiveKit. See the companion blog How to add real-time Speech-to-Text to your LiveKit application for a full walkthrough.
See the companion blog for more detailed instructions on how to set up and run this example, but here is the general overview:
- Clone this repository and
cd
into it - Rename
.env.example
to.env
- Go to livekit.io and sign up
- In your LiveKit dashboard, go to
Settings > Keys
and click on your API key - Copy the URL, API key, and secret values into the
.env
file - Go to assemblyai.com and sign up, and then set up billing to get access to Streaming Speech-to-Text
- Copy your AssemblyAI API key into the
.env
file pip install -r requirements.txt
to install requirementspython stt_agent.py
to run the Speech-to-Text agent- Go the the LiveKit Agents Playground and sign in with your LiveKit account. Begin speaking and you will see your speech transcribed in real-time both in the Playground and in the agent's terminal.