LM Studio Talker is a Python-based tool designed for fast, low-latency voice conversations with LLMs hosted locally via LM Studio.
It supports two operating modes:
- Fast Performance: Prioritizes low latency using optimized STT models and fast TTS.
- High Quality: Prioritizes audio quality (configurable).
The tool can be run natively on your host machine (optimized for Apple Silicon/M-series) or within a Docker container.
- 🎙️ Voice Interaction: Real-time Speech-to-Text (STT) and Text-to-Speech (TTS).
- 🚀 Low Latency: Streaming responses from LLM and optimized audio pipeline.
- 🐳 Docker Support: Full containerization for easy deployment.
- ⚙️ Configurable: Toggle between Speed and Quality modes.
- LM Studio: Download and install LM Studio.
- Local Server: Start the Local Inference Server in LM Studio (default port
1234). - Python 3.10+ (if running locally).
-
Clone the repository:
git clone https://github.com/yourusername/LMStudioTalker.git cd LMStudioTalker -
Set up Virtual Environment:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txtNote: On Linux, you may need system dependencies like
portaudio19-devandespeak. -
Run the Tool:
python src/main.py --language pl # Or for fast mode python src/main.py --language en --fastEnsure your microphone and speakers are active.
-
Build the Image:
docker build -t lm-studio-talker . -
Run the Container: Audio device access from Docker varies by OS.
Linux / Native:
docker run --rm -it \ --device /dev/snd \ --network host \ lm-studio-talker
Mac/Windows: Docker Desktop has limited access to host audio hardware. It is recommended to run the Python script natively on these platforms for voice support. Passing audio devices to Docker on Mac requires PulseAudio/Socket trickeries.
Edit src/config.py to change settings:
class AppConfig(BaseModel):
# LM Studio URL
lm_studio_base_url: str = "http://127.0.0.1:1234/v1"
# Performance Mode (True = Faster, False = Better Quality)
fast_mode: bool = True - LLM Client:
openai(Python SDK) - STT:
faster-whisper - TTS:
pyttsx3 - Audio I/O:
sounddevice