|
2 | 2 | "title": "Voice Chatbot", |
3 | 3 | "description": "In this coding challenge, I build a conversational voice chatbot entirely in the browser with p5.js. I combine three pieces: speech-to-text with OpenAI's Whisper model, text-to-speech with Kokoro TTS, and a \"brain\" for the bot. I also explore the transformers.js pipeline API and the Web Audio API. For the bot's brain, I start with a simple ELIZA-style therapist, then incorporate a RiveScript number-guessing game, and finally a local LLM.", |
4 | 4 | "videoNumber": "188", |
5 | | - "videoId": "", |
6 | | - "date": "2026-04-20", |
| 5 | + "videoId": "s2jm2Z22ibA", |
| 6 | + "date": "2026-04-27", |
7 | 7 | "nebulaSlug": "codingtrain-coding-challenge-188-voice-chatbot", |
8 | 8 | "languages": ["JavaScript", "p5.js"], |
9 | | - "topics": ["text-to-speech", "speech-to-text", "chatbot", "Rivescript", "LLMS", "Agents", "AI"], |
| 9 | + "topics": ["text-to-speech", "speech-to-text", "chatbot", "Rivescript", "LLMS", "Agents", "AI", "transformers.js", "Web Audio API"], |
10 | 10 | "canContribute": true, |
11 | 11 | "relatedChallenges": ["42-markov-chain-name-generator", "43-context-free-grammar", "80-voice-chatbot-with-p5speech"], |
12 | 12 | "timestamps": [ |
|
30 | 30 | { "time": "0:26:56", "title": "Swapping in a RiveScript number-guessing brain" }, |
31 | 31 | { "time": "0:31:22", "title": "Adding a language model (SmolLM2) as the brain" }, |
32 | 32 | { "time": "0:38:33", "title": "Final demo: the random number chatbot" }, |
33 | | - { "time": "0:39:03", "title": "Outro" } |
| 33 | + { "time": "0:39:03", "title": "Goodbye!" } |
34 | 34 | ], |
35 | 35 | "codeExamples": [ |
36 | 36 | { |
37 | | - "title": "Graph Waveform of Recording", |
38 | | - "description": "The sketch graphs the waveform from mic input.", |
39 | | - "image": "waveform.jpg", |
| 37 | + "title": "LLM Chatbot", |
| 38 | + "description": "This final voice chatbot, prompted to only reply with random numbers.", |
| 39 | + "image": "img.jpg", |
40 | 40 | "urls": { |
41 | | - "p5": "https://editor.p5js.org/codingtrain/sketches/cck49wDub" |
| 41 | + "p5": "https://editor.p5js.org/codingtrain/sketches/RHhT9I4Nm" |
42 | 42 | } |
43 | 43 | }, |
44 | 44 | { |
45 | | - "title": "Real Time Waveform", |
46 | | - "description": "The sketch graphs the waveform from mic input in real time.", |
47 | | - "image": "realtime.jpg", |
| 45 | + "title": "Number Guessing Bot", |
| 46 | + "image": "number_bot.jpg", |
| 47 | + "description": "Voice chatbot that uses RiveScript to play a number-guessing game.", |
48 | 48 | "urls": { |
49 | | - "p5": "https://editor.p5js.org/codingtrain/sketches/aaRIT-x6a" |
| 49 | + "p5": "https://editor.p5js.org/codingtrain/sketches/AJw7zMN9q" |
50 | 50 | } |
51 | 51 | }, |
52 | 52 | { |
53 | | - "title": "Loading bars", |
54 | | - "description": "The sketch graphs loading bars for the models.", |
55 | | - "image": "loading_bars.jpg", |
| 53 | + "title": "Therapy Bot", |
| 54 | + "description": "Started voice chatbot with an ELIZA-style therapist brain.", |
| 55 | + "image": "img.jpg", |
56 | 56 | "urls": { |
57 | | - "p5": "https://editor.p5js.org/codingtrain/sketches/E9Ob3x8eJ" |
| 57 | + "p5": "https://editor.p5js.org/codingtrain/sketches/37LFEPUVV" |
58 | 58 | } |
59 | 59 | }, |
60 | 60 | { |
61 | | - "title": "Therapy Bot", |
62 | | - "description": "Basic chatbot", |
63 | | - "image": "img.jpg", |
| 61 | + "title": "Model Loading Bars", |
| 62 | + "description": "The voice chatbot that displays loading bars for the models.", |
| 63 | + "image": "loading_bars.jpg", |
64 | 64 | "urls": { |
65 | | - "p5": "https://editor.p5js.org/codingtrain/sketches/37LFEPUVV" |
| 65 | + "p5": "https://editor.p5js.org/codingtrain/sketches/E9Ob3x8eJ" |
66 | 66 | } |
67 | 67 | }, |
68 | 68 | { |
69 | | - "title": "Number Guessing Bot", |
70 | | - "image": "number_bot.jpg", |
71 | | - "description": "Voice bot that listens for a number and gives feedback.", |
| 69 | + "title": "Waveform of Recording", |
| 70 | + "description": "The sketch graphs a waveform from recorded mic input.", |
| 71 | + "image": "waveform.jpg", |
72 | 72 | "urls": { |
73 | | - "p5": "https://editor.p5js.org/codingtrain/sketches/AJw7zMN9q" |
| 73 | + "p5": "https://editor.p5js.org/codingtrain/sketches/cck49wDub" |
74 | 74 | } |
75 | 75 | }, |
76 | 76 | { |
77 | | - "title": "LLM Chatbot", |
78 | | - "description": "This chatbot has been prompted to only reply with random numbers.", |
79 | | - "image": "img.jpg", |
| 77 | + "title": "Real Time Waveform", |
| 78 | + "description": "The sketch graphs a waveform from mic input in real time.", |
| 79 | + "image": "realtime.jpg", |
80 | 80 | "urls": { |
81 | | - "p5": "https://editor.p5js.org/codingtrain/sketches/RHhT9I4Nm" |
| 81 | + "p5": "https://editor.p5js.org/codingtrain/sketches/aaRIT-x6a" |
82 | 82 | } |
83 | 83 | } |
84 | 84 | ], |
|
90 | 90 | "icon": "π", |
91 | 91 | "title": "p5.2 Reference", |
92 | 92 | "url": "https://beta.p5js.org", |
93 | | - "description": "Reference page for the beta version of p5.2." |
| 93 | + "description": "Reference page for the beta version of p5.js 2.0" |
94 | 94 | }, |
95 | 95 | { |
96 | 96 | "icon": "π", |
|
208 | 208 | } |
209 | 209 | ] |
210 | 210 | }, |
211 | | - { |
212 | | - "title": "Videos", |
213 | | - "links": [ |
214 | | - { |
215 | | - "icon": "π", |
216 | | - "title": "p5.js 2.0 async and await", |
217 | | - "url": "/tracks/p5js-2.0/p5js-2.0/async-await", |
218 | | - "description": "This video discusses loading data with async and await." |
219 | | - } |
220 | | - ] |
221 | | - }, |
222 | 211 | { |
223 | 212 | "title": "Live Stream Archives", |
224 | 213 | "links": [ |
|
0 commit comments