Refer to this page;
Github Page ; AI Voice assistant DAZI
The code works and chatgpt and TTS also works fine
Github Page of the code Code gives these temperoray keys from sTEB AI
// ByteDance ASR API configuration
const char* asr_api_key = “07fcb4a5-b7b2-45d8-864a-8cc0292380df”;
const char* asr_cluster = “volcengine_input_en”;
const char* openai_apiKey = “[api-key]GIoHe3Zm”;
Base URL from sTEB AI : api.chatanywhere.tech
This works fine, but is limited by number of reponses.
However, when I use my API keys, Chatgpt fails to respond. The errors is ; Failed to get response from ChatGpt. My model (gpt-4o-mini ; Paid subscription)
I use the ASR of Bytedance (Given above) with no issues. But when i use my API Key,
const char* openai_apiKey = “sk-proj-XLivMxXXXXXXXXXXXXXlmkoNKLkTNXXXXXHwA”; // (masked Key)
const char* openai_apiBaseUrl = openai v1/chat/completions
The Chatgpt responses are not received. Need help in resolving the issue.
Error logs; ASR Recognition Result
Hello, beautiful. How are you doing
[LLM] Sending to ChatGPT…
[ERROR] Failed to get ChatGPT response
Reconnecting WebSocket for new session…
WebSocket disconnected
Connecting WebSocket…
WebSocket connected
Recording started…
Request ID: 16997_40308
Sending config:
{“app”:{“cluster”:“volcengine_input_en”},“user”:{“uid”:“fc2cc64eb580”},“request”:{“reqid”:“16997_40308”,“nbest”:1,“workflow”:“audio_in,resample,partition,vad,fe,decode,itn,nlu_punctuate”,“result_type”:“full”,“sequence”:1},“audio”:{“format”:“raw”,“rate”:16000,“bits”:16,“channel”:1,“codec”:“raw”}}
[ASR] Listening… Speak now