Skip to content

Commit 3981cad

Browse files
committed
Add changes to Alexandre's PT
1 parent 1a8140d commit 3981cad

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

projects/create-a-voice-virtual-assistant/create-a-voice-virtual-assistant.mdx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tags:
1818

1919
<AuthorAvatar
2020
author_name="Alexandre Sajus"
21-
author_avatar="/media/Alexandre.jpg"
21+
author_avatar="/images/projects/authors/alexandre.jpg"
2222
username="AlexandreSajus"
2323
uid={true}
2424
/>
@@ -50,15 +50,19 @@ That's why I decided to create my own! Back then, APIs were limited in functiona
5050
- 💻 Taipy to display the conversation
5151
- 🤝 And a lot of Python code to glue everything together
5252

53-
<ImageZoom src="https://i.imgur.com/bWX2sx8.png" style={{width: "60%", height: "auto"}}/>
53+
<ImageZoom src="https://i.imgur.com/bWX2sx8.png" />
5454

5555
It was a lot of work but it was worth it! I released it on [GitHub](https://github.com/AlexandreSajus/JARVIS) and on [YouTube](https://github.com/AlexandreSajus/JARVIS) and it got 24k views, 485 stars and 88 forks! Here's me talking to my chatbot after spending 24 hours without sleep creating it:
5656

57-
<ImageZoom src="https://i.imgur.com/ecC0Tff.png" style={{width: "60%", height: "auto"}}/>
57+
<ImageZoom src="https://i.imgur.com/ecC0Tff.png" />
5858

5959
Now, in 2025, I'm excited to revisit this project since APIs have evolved a lot since then. What took 6 different libraries to work in 2023 can now be done with just one API. In this tutorial, we will use the ElevenLabs API to record our voice and play the assistant's response in real time:
6060

61-
<ImageZoom src="https://i.imgur.com/6iGvFsk.gif" style={{width: "60%", height: "auto"}}/>
61+
<video
62+
controls
63+
src="https://i.imgur.com/Rhcgc2O.mp4"
64+
width="620">
65+
</video>
6266

6367
Let's dive in!
6468

@@ -92,33 +96,33 @@ ElevenLabs provides a Conversational AI API that we will use to create our Voice
9296
- 📈 It synthesizes the response into speech
9397
- 🔊 It plays the synthesized speech through the speakers
9498

95-
<ImageZoom src="https://i.imgur.com/QZkz0Rh.png" style={{width: "60%", height: "auto"}}/>
99+
<ImageZoom src="https://i.imgur.com/QZkz0Rh.png" />
96100

97101
1. Sign up at [ElevenLabs](https://elevenlabs.io/app/sign-up) and follow the instructions to create an account.
98102

99103
2. Once signed in, go to "Conversational AI"
100104

101-
<ImageZoom src="https://i.imgur.com/aIYfusq.png" style={{width: "60%", height: "auto"}}/>
105+
<ImageZoom src="https://i.imgur.com/aIYfusq.png" />
102106

103107
3. Go to "Agents"
104108

105-
<ImageZoom src="https://i.imgur.com/L9xwBgl.png" style={{width: "60%", height: "auto"}}/>
109+
<ImageZoom src="https://i.imgur.com/L9xwBgl.png" />
106110

107111
4. Click on "Start from blank"
108112

109113
<ImageZoom src="https://i.imgur.com/PD8v3Ax.png" style={{width: "60%", height: "auto"}}/>
110114

111115
5. Create a ".env" file at the root of your project folder. We will use this file to store our API credentials securely. This way they won't be hardcoded in the script. In this ".env" file, add your Agent ID:
112116

113-
<ImageZoom src="https://i.imgur.com/vfmMv7r.png" style={{width: "60%", height: "auto"}}/>
117+
<ImageZoom src="https://i.imgur.com/vfmMv7r.png"/>
114118

115119
```bash
116120
AGENT_ID=your_agent_id
117121
```
118122

119123
6. Go to the "Security" tab, enable the "First message" and "System prompt" overrides, and save. This will allow us to customize the assistant's first message and system prompt using Python code.
120124

121-
<ImageZoom src="https://i.imgur.com/0vfNTOd.png" style={{width: "60%", height: "auto"}}/>
125+
<ImageZoom src="https://i.imgur.com/0vfNTOd.png"/>
122126

123127
7. Click on your profile and go to "API keys". Create a new API key and copy it to your ".env" file:
124128

@@ -128,7 +132,7 @@ API_KEY="sk_XXX...XXX"
128132

129133
**Make sure to save your ".env" file after adding the credentials.**
130134

131-
<ImageZoom src="https://i.imgur.com/Q5QrGVl.png" style={{width: "60%", height: "auto"}}/>
135+
<ImageZoom src="https://i.imgur.com/Q5QrGVl.png" />
132136

133137
ElevenLabs is now set up and ready to be used in our Python script!
134138

@@ -269,7 +273,7 @@ Stay creative and keep experimenting with AI-powered assistants!
269273

270274
## More Resources
271275

272-
- [Source Code](TO DO)
276+
- [Source Code](https://github.com/AlexandreSajus/codedex-voice/blob/main/voice_assistant.py)
273277
- ElevenLabs Conversational AI [Overview](https://elevenlabs.io/docs/conversational-ai/overview)
274278
- ElevenLabs Python SDK [Documentation](https://elevenlabs.io/docs/conversational-ai/libraries/python)
275279
- Enable your assistant to execute Python functions with [Client Tools](https://elevenlabs.io/docs/conversational-ai/customization/tools-events/client-tools)

0 commit comments

Comments
 (0)