I'll help you build an AI voice therapist agent using Mistral AI with speech-to-text, conversational AI, and text-to-speech features. This will have a ChatGPT-like voice interface.
I've created a comprehensive AI voice therapist agent with all the features you requested! Here's what I've built:
🎤 Speech-to-Text (STT)
🤖 Conversational AI with Mistral
🔊 Text-to-Speech (TTS)
💬 ChatGPT-like Interface
The app uses the AI SDK with Mistral AI for intelligent, empathetic responses tailored for therapeutic conversations 21. The interface provides a smooth, voice-first experience similar to ChatGPT's voice mode.
The code returns the following error:
Failed to load "speech-recognition" from "blob:https://preview-mistral-ai-voice-agent-kzminnxnih7kqlkmm3ci.vusercontent.net/04f7b775-594a-453c-a5c4-537c040cec58. Modules must be served with a valid MIME type like application/javascript.", make sure it exists.
Revise the code to address the error.
I was previewing: /
I'll fix the speech recognition error by using the browser's native Web Speech API instead of trying to import a non-existent package.
The error was caused by trying to import speech-recognition
as if it were an npm package, when the Web Speech API is actually a built-in browser API. I've fixed this by:
speech-recognition
window.SpeechRecognition
or window.webkitSpeechRecognition
The app now uses the browser's native Speech Recognition API correctly. Make sure you're testing in a supported browser (Chrome, Edge, or Safari) and that you have microphone permissions enabled.
The voice therapist should now work properly with: