Skip to content

mohammed840/VoiceChat-GPT-OSS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trying out gpt-oss

Run a simple voice assistant with Python that uses gpt-oss for the LLM.

Overview

This guide walks you through the setup of talking to gpt-oss using LiveKit Agents for Python. In less than 2 minutes, you'll have a voice assistant that you can speak to in your terminal, browser, telephone, or native app.

Requirements

The following sections describe the minimum requirements to get started.

Python

LiveKit Agents requires Python 3.9 or later.

LiveKit server

You need a LiveKit server instance to transport realtime media between user and agent. The easiest way to get started is with a free LiveKit Cloud account. Create a project and use the API keys in the following steps. You may also self-host LiveKit if you prefer.

Setup

Use the instructions in the following sections to set up your new project.

Packages

Install the following packages to build a complete voice AI agent with your STT-LLM-TTS pipeline, noise cancellation, and turn detection:

pip install \
  "livekit-agents[assemblyai,groq,cartesia,silero,turn-detector]~=1.0" \
  "livekit-plugins-noise-cancellation~=0.2" \
  "python-dotenv"

Environment variables

Create a file named .env and add your LiveKit credentials along with the necessary API keys for your AI providers.

STT-LLM-TTS pipeline:

ASSEMBLYAI_API_KEY=<Your Deepgram API Key>
GROQ_API_KEY=<Your OpenAI API Key>
CARTESIA_API_KEY=<Your Cartesia API Key>
LIVEKIT_API_KEY=%{apiKey}%
LIVEKIT_API_SECRET=%{apiSecret}%
LIVEKIT_URL=%{wsURL}%

Agent code

Use the agent.py file in this repo.

Download model files

You first need to download the model files for the turn-detector, silero, or noise-cancellation plugins:

python agent.py download-files

Speak to your agent

Start your agent in console mode to run inside your terminal:

python agent.py console

Your agent speaks to you in the terminal, and you can speak to it as well.

Connect to playground

Start your agent in dev mode to connect it to LiveKit and make it available from anywhere on the internet:

python agent.py dev

Use the Agents playground to speak with your agent and explore its full range of multimodal capabilities.

Congratulations, your agent is up and running. Continue to use the playground or the console mode as you build and test your agent.

💡 Agent CLI modes

In the console mode, the agent runs locally and is only available within your terminal.

Run your agent in dev (development / debug) or start (production) mode to connect to LiveKit and join rooms.

Next steps

Follow these guides bring your voice AI app to life in the real world.


This document was rendered at 2025-08-05T23:20:56.508Z. For the latest version of this document, see https://docs.livekit.io/agents/start/voice-ai.md.

To explore all LiveKit documentation, see llms.txt.

About

Trying out GPT-OSS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages