Implementing Voice Conversation with ESP32

1 Implementing Voice Conversation: Previously, I demonstrated the conversation function using the ESP-Box’s ChatGPT example, but the response speed was too slow. This time, I will create an accelerated version and summarize the implementation principles, hoping it will help my future self and, even better, help others.2 Implementation Method Let’s sort out the code of chatgpt_demo and summarize some functions and implementation methods.Implementing Voice Conversation with ESP32

3 Related Links: 3.1 Audio to Text: https://ai.fakeopen.com/v1/audio/transcriptions 3.2 Text to Chat Conversation: https://api.oioweb.cn/api/ai/chat?text=content 3.3 Chat Conversation to Voice Audio: https://dds.dui.ai/runtime/v1/synthesize?voiceId=%s&text=%s&speed=1&volume=%d&audiotype=%s

4 Demonstration Effect

5 Summary: To implement the conversation function, we need to solve the problems of voice recognition, text to chat conversation, and finally chat conversation to voice. These issues can all be resolved using existing API interfaces. Reply with the keyword “CHATROBOT” to obtain relevant resources for this summary. When trying to solve problems through code, we should first put down the mouse and keyboard, pick up a pen and paper, and write out the entire implementation thought process. If the thought process is flawed, the code we write will definitely be wrong. Drawing several times with a pen until the thought process is clear will often lead to more efficient coding.

Leave a Comment

×