1

This guide reorganizes a FreeDiDi tutorial published on July 4, 2026. The commands and performance observations come from the source and were not independently reproduced by LingjingHub. Check current project documentation before installation because Python, CUDA, PyTorch, and model versions can change.

2

Architecture

3

The proposed local pipeline has four parts: Whisper converts speech to text; a local model served by llama.cpp or Ollama generates the response; Qwen3-TTS converts the response back to speech; and a local browser interface provides microphone control, live transcription, and status feedback. Once models and dependencies are downloaded, the main conversation path can run locally.

4

What you need

5

Use a current Windows 10 or Windows 11 system with Python 3.11, Git, FFmpeg, enough disk space for the selected models, and a supported GPU if you want low latency. GPU memory requirements depend on model size, quantization, context length, and whether speech recognition and synthesis share the same device.

6

1. Prepare an isolated Python environment

7

Install Python, Git, and FFmpeg from their official sources. Create a dedicated virtual environment instead of installing packages globally. If PowerShell blocks activation, consult Microsoft's execution-policy documentation and use the narrowest scope appropriate for your machine; do not disable security controls globally.

8

2. Install the speech pipeline

9

Activate the virtual environment and install the speech-to-speech package documented by the project. The source tutorial uses Whisper for Chinese recognition and Qwen3-TTS for Chinese speech synthesis. Confirm the package's supported Python, PyTorch, CUDA, and model versions before proceeding.

10

3. Start a local language-model endpoint

11

The source uses llama.cpp with a quantized Qwen model and an OpenAI-compatible endpoint on 127.0.0.1. Ollama can be used instead if it already serves the selected model. Keep the endpoint bound to localhost unless you have deliberately configured authentication, firewall rules, and network access controls.

12

4. Connect speech recognition, the LLM, and speech synthesis

13

Configure the speech service to use Whisper, the local OpenAI-compatible endpoint, and Qwen3-TTS. A successful start should expose the local real-time WebSocket service and show that the selected models have loaded. The first launch can take longer because model files may need to be downloaded.

14

5. Open the local browser interface

15

Run the interface from the Hugging Face voice demo project, open its localhost address in Chrome or Edge, set the local WebSocket endpoint, and grant microphone access only to the local page. The interface should indicate listening, processing, speaking, and error states without embedding a third-party video player.

16

Troubleshooting

17

If the model server starts but the voice interface cannot connect, verify the port, protocol, and service order. If CUDA acceleration is unavailable, confirm the installed driver, PyTorch build, and llama.cpp package match the hardware. Reduce model size, context length, or speech-model size when memory is insufficient.

18

Security boundary

19

Download executables, models, and scripts from official project pages whenever possible. Do not bypass Windows SmartScreen for unsigned batch files without inspecting them. Do not expose the local model or WebSocket ports to the public internet, and do not assume that local processing automatically makes every downloaded model or dependency trustworthy.

20

Official references

21

https://www.python.org/downloads/

22

https://git-scm.com/

23

https://github.com/ggml-org/llama.cpp

24

https://huggingface.co/spaces/smolagents/hf-realtime-voice

25

Source article

26

https://www.freedidi.com/24707.html

27

Break the goal into input, action, and output before adding review checkpoints.

28

Keep examples, failure conditions, and review criteria so the tutorial stays reusable.

Tip: test with a small example before using the workflow on real work.