关于使用google-translate 和wwe合并后无法使用google-tts

a376185382
Posts: 1
Joined: Thu Dec 01, 2022 10:39 am

关于使用google-translate 和wwe合并后无法使用google-tts

Postby a376185382 » Thu Dec 01, 2022 10:52 am

我打算使用lyrat-mini做一个使用唤醒词唤醒然后后续通过google-sr和google-tts进行交流的聊天机器人,但是当我合并了adf的例子中的wwe和google-translate之后,在使用唤醒词唤醒后,我想让他使用google-tts说一句话,但是出现以下错误

Code: Select all

I (16188) wwe_example: rec_engine_cb - REC_EVENT_WAKEUP_START
W (16188) AUDIO_ELEMENT: OUT-[i2s] AEL_IO_ABORT
W (16188) AUDIO_ELEMENT: OUT-[i2s] AEL_IO_ABORT
W (16198) AUDIO_ELEMENT: OUT-[i2s] AEL_IO_ABORT
W (16198) AUDIO_ELEMENT: OUT-[i2s] AEL_IO_ABORT
I (16208) GOOGLE_TTS: TTS text = hola, soy demo
I (16228) AUDIO_ELEMENT: [tts_http-0x3f8302c0] Element task created
I (16228) AUDIO_ELEMENT: [tts_mp3-0x3f831528] Element task created
I (16228) AUDIO_ELEMENT: [tts_i2s-0x3f830178] Element task created
I (16238) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:3982275 Bytes, Inter:47643 Bytes, Dram:18907 Bytes

I (16248) AUDIO_ELEMENT: [tts_http] AEL_MSG_CMD_RESUME,state:1
I (16258) GOOGLE_TTS: [ + ] HTTP client HTTP_STREAM_PRE_REQUEST, lenght=0
I (16268) AUDIO_ELEMENT: [tts_mp3] AEL_MSG_CMD_RESUME,state:1
I (16268) MP3_DECODER: MP3 opened
I (16268) AUDIO_ELEMENT: [tts_i2s] AEL_MSG_CMD_RESUME,state:1
I (16278) AUDIO_PIPELINE: Pipeline started
I (16278) I2S_STREAM: AUDIO_STREAM_WRITER
W (16378) AUDIO_ELEMENT: IN-[raw] AEL_IO_ABORT
W (16378) AUDIO_ELEMENT: IN-[raw] AEL_IO_ABORT
W (16378) AUDIO_ELEMENT: IN-[raw] AEL_IO_ABORT
W (16378) AUDIO_EVT: There is no space in external queue
W (16388) AUDIO_ELEMENT: IN-[raw] AEL_IO_ABORT
W (16398) AUDIO_EVT: There is no space in external queue
W (16398) AUDIO_ELEMENT: IN-[raw] AEL_IO_ABORT
错误的地方发生在唤醒词成功唤醒后执行的

Code: Select all

if (AUDIO_REC_WAKEUP_START == type) {
        ESP_LOGI(TAG2, "rec_engine_cb - REC_EVENT_WAKEUP_START");

        if (voice_reading) {
            int msg2 = REC_CANCEL;
            if (xQueueSend(rec_q, &msg2, 0) != pdPASS) {
                ESP_LOGE(TAG2, "rec cancel send failed");
            }
        }
        audio_pipeline_stop(pipeline);
        audio_pipeline_wait_for_stop(pipeline);
        //ESP_LOGE(TAG2, "free heap size: %d",  esp_get_free_heap_size());
        //ESP_LOGE(TAG2, "minimum free heap size: %d",  esp_get_minimum_free_heap_size());
        google_tts_start(tts, "hola, soy demo", GOOGLE_TTS_LANG);
        vTaskDelay(20);
        while(google_tts_check_event_finish(tts, &msg)){
            ESP_LOGI(TAG2, "%d",google_tts_check_event_finish(tts, &msg));
        }

    }
我一开始以为是pipeline冲突导致的所以将start_recorder中用于唤醒词创建的pipeline关闭然后再启动start_tts,但是还是发送了错误,该怎么修改呢?

我项目的完整代码在我的git:https://github.com/HongYan12345/lyrat_chatbot

Who is online

Users browsing this forum: No registered users and 16 guests