dvalle08 commited on
Commit
40f73fa
·
1 Parent(s): 0bac71a

Add README.md for project documentation and update Dockerfile to include it.

Browse files
Files changed (4) hide show
  1. Dockerfile +1 -1
  2. README.md +92 -0
  3. src/agent/graph.py +0 -5
  4. start.sh +3 -0
Dockerfile CHANGED
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y \
10
 
11
  RUN pip3 install uv
12
 
13
- COPY pyproject.toml uv.lock ./
14
  RUN uv sync --frozen --no-dev
15
 
16
  COPY src/ ./src/
 
10
 
11
  RUN pip3 install uv
12
 
13
+ COPY pyproject.toml uv.lock README.md ./
14
  RUN uv sync --frozen --no-dev
15
 
16
  COPY src/ ./src/
README.md CHANGED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Open Voice Agent
3
+ emoji: 🎤
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ app_port: 8501
8
+ pinned: false
9
+ ---
10
+
11
+ # Open Voice Agent
12
+
13
+ Real-time AI voice conversation application powered by LiveKit Agents, Moonshine STT, and Pocket TTS.
14
+
15
+ ## Features
16
+
17
+ - **Streaming Speech-to-Text**: Moonshine (HuggingFace transformers)
18
+ - **LLM Integration**: HuggingFace models or NVIDIA API via LangGraph
19
+ - **Text-to-Speech**: Pocket TTS (Kyutai) with local inference
20
+ - **Voice Activity Detection**: Silero VAD
21
+ - **Web Interface**: Streamlit-based UI
22
+
23
+ ## Setup
24
+
25
+ ### Local Development
26
+
27
+ 1. Install dependencies:
28
+ ```bash
29
+ uv sync
30
+ source .venv/bin/activate
31
+ ```
32
+
33
+ 2. Configure environment:
34
+ ```bash
35
+ cp .env.example .env
36
+ # Edit .env with your API keys
37
+ ```
38
+
39
+ 3. Run the application:
40
+ ```bash
41
+ # Terminal 1: Start LiveKit agent
42
+ uv run src/agent/agent.py start
43
+
44
+ # Terminal 2: Start Streamlit UI
45
+ streamlit run src/streamlit_app.py
46
+ ```
47
+
48
+ ### Docker
49
+
50
+ ```bash
51
+ docker build -t open-voice-agent .
52
+ docker run -p 8501:8501 --env-file .env open-voice-agent
53
+ ```
54
+
55
+ ## Environment Variables
56
+
57
+ ### Required
58
+
59
+ - `LIVEKIT_URL`: WebSocket URL for LiveKit server (wss://...)
60
+ - `LIVEKIT_API_KEY`: LiveKit API key
61
+ - `LIVEKIT_API_SECRET`: LiveKit API secret
62
+
63
+ ### LLM Provider (choose one)
64
+
65
+ **HuggingFace** (local inference):
66
+ ```bash
67
+ LLM_PROVIDER=huggingface
68
+ HUGGINGFACE_MODEL_ID=Qwen/Qwen2.5-3B-Instruct
69
+ HUGGINGFACE_DEVICE=cuda # or 'cpu' or leave empty for auto
70
+ HF_TOKEN=hf_xxx # optional, for private models
71
+ ```
72
+
73
+ **NVIDIA** (API-based):
74
+ ```bash
75
+ LLM_PROVIDER=nvidia
76
+ NVIDIA_API_KEY=nvapi-xxx
77
+ NVIDIA_MODEL=meta/llama-3.1-8b-instruct
78
+ ```
79
+
80
+ ### Optional
81
+
82
+ See `.env.example` for all available configuration options.
83
+
84
+ ## Requirements
85
+
86
+ - Python >= 3.12, < 3.13
87
+ - LiveKit server (cloud or self-hosted)
88
+ - NVIDIA API key OR sufficient compute for local LLM inference
89
+
90
+ ## License
91
+
92
+ Apache 2.0
src/agent/graph.py CHANGED
@@ -45,8 +45,3 @@ def create_graph():
45
  workflow.add_edge(START, "agent")
46
  workflow.add_edge("agent", END)
47
  return workflow.compile()
48
-
49
- graph = create_graph()
50
-
51
- for msg in graph.stream({"messages": [{"role": "user", "content": "Hello, how are you?"}]}, stream_mode="messages"):
52
- print(msg)
 
45
  workflow.add_edge(START, "agent")
46
  workflow.add_edge("agent", END)
47
  return workflow.compile()
 
 
 
 
 
start.sh CHANGED
@@ -4,5 +4,8 @@ set -e
4
  echo "Starting LiveKit agent..."
5
  uv run src/agent/agent.py start &
6
 
 
 
 
7
  echo "Starting Streamlit app..."
8
  exec streamlit run src/streamlit_app.py --server.port=8501 --server.address=0.0.0.0
 
4
  echo "Starting LiveKit agent..."
5
  uv run src/agent/agent.py start &
6
 
7
+ echo "Waiting 30 seconds before starting Streamlit..."
8
+ sleep 30
9
+
10
  echo "Starting Streamlit app..."
11
  exec streamlit run src/streamlit_app.py --server.port=8501 --server.address=0.0.0.0