如图, 按照read me 操作, 填入
WIFI SSID 密码 和BAIDU_ACCESS_KEY ,BAIDU_SECRET_KEY 这些信息。
但是 启动后,总是出现 access token 错误。
离线
离线
王者归来!
离线
用我的试一试, 一楼有:
API Key: FvNYWABLHgYC3aMMgaO7j5Qh
Secret Key: uc1IRoK4yMBqvAnmizT0ZZ7nR5OgYREU
按照你提供的这两个 key ,确实可以。
make flash 固件烧录成功之后, 重启ESP32, 播放声音 下面定义的声音;
#define TTS_TEXT "欢迎使用乐鑫音频平台,想了解更多方案信息请联系我们"
大概的流程应该是, WIFI 连接成功====》通过 http 方式 使用上面两个key 将TXT 发给百度=====》 百度译解出语音文件 MP3=====》 发给ESP32=====》 ESP32 接收到MP3之后 通过 语音解码ic 播放出来
这个过程中有2个部分比较模糊
1. 代码上看起来很模糊,封装得太密了,目前只是大概的看出 一条 管道 WIFI-->http_stream-->mp3_decoder-->i2s_stream-->[codec_chip]
2. 我在百度上 同样创建了应用,使用应用的key 但是 就是不成功~~~~ 晕哥 是不是还有其他要注意的地方 我遗漏了呢? 这方面能给个大概的介绍吗?
离线
我的上电没有提示音,难受中,也没有显示token错误之类的
from BLK0 of EFUSE[0m
[0;32mI (118) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
I (148) wifi: Init dynamic tx buffer num: 32
I (148) wifi: Init data frame dynamic rx buffer num: 32
I (148) wifi: Init management frame dynamic rx buffer num: 32
I (148) wifi: wifi driver task: 3ffc0d90, prio:23, stack:4096
I (158) wifi: Init static rx buffer num: 10
I (158) wifi: Init dynamic rx buffer num: 32
I (158) wifi: wifi power manager task: 0x3ffc59d0 prio: 21 stack: 2560
[0;32mI (198) phy: phy_version: 3662, 711a97c, May 9 2018, 14:29:06, 0, 0[0m
I (198) wifi: mode : sta (b4:e6:2d:d3:11:21)
I (318) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (1298) wifi: state: init -> auth (b0)
I (1308) wifi: state: auth -> assoc (0)
I (1308) wifi: state: assoc -> run (10)
[0;32mI (2058) BAIDU_SPEECH_EXAMPLE: [ 1 ] Start audio codec chip[0m
[0;32mI (2058) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 [0m
[0;31mE (2068) gpio: gpio_install_isr_service(406): GPIO isr service already installed[0m
[0;32mI (2088) ES8388_DRIVER: init,out:02, in:00[0m
[0;32mI (2088) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [0m
[0;32mI (2088) AUDIO_HAL: Codec mode is 2, Ctrl:1[0m
[0;32mI (2098) BAIDU_SPEECH_EXAMPLE: [2.0] Create audio pipeline for playback[0m
[0;32mI (2098) BAIDU_SPEECH_EXAMPLE: [2.1] Create http stream to read data[0m
[0;32mI (2108) BAIDU_SPEECH_EXAMPLE: [2.2] Create i2s stream to write data to codec chip[0m
[0;32mI (2118) I2S: DMA Malloc info, datalen=blocksize=1200, dma_buf_count=3[0m
[0;32mI (2128) I2S: DMA Malloc info, datalen=blocksize=1200, dma_buf_count=3[0m
[0;32mI (2138) I2S: APLL: Req RATE: 44100, real rate: 43945.016, BITS: 16, CLKM: 1, BCK: 8, MCLK: 11289966.924, SCLK: 1406240.500000, diva: 1, divb: 0[0m
[0;32mI (2148) BAIDU_SPEECH_EXAMPLE: [2.3] Create mp3 decoder to decode mp3 file[0m
[0;32mI (2158) MP3_DECODER: MP3 init[0m
[0;32mI (2158) BAIDU_SPEECH_EXAMPLE: [2.4] Register all elements to audio pipeline[0m
[0;32mI (2168) BAIDU_SPEECH_EXAMPLE: [2.5] Link it together http_stream-->mp3_decoder-->i2s_stream-->[codec_chip][0m
[0;32mI (2178) BAIDU_SPEECH_EXAMPLE: [2.6] Setup uri (http as http_stream, mp3 as mp3 decoder, and default output is i2s)[0m
[0;32mI (2188) BAIDU_SPEECH_EXAMPLE: [ 4 ] Setup event listener[0m
[0;32mI (2188) BAIDU_SPEECH_EXAMPLE: [4.1] Listening event from all elements of pipeline[0m
[0;32mI (2198) BAIDU_SPEECH_EXAMPLE: [4.2] Listening event from peripherals[0m
[0;32mI (2208) BAIDU_SPEECH_EXAMPLE: [ 5 ] Start audio_pipeline[0m
[0;32mI (2218) AUDIO_ELEMENT: [http] Element task created[0m
[0;32mI (2218) AUDIO_ELEMENT: [mp3] Element task created[0m
[0;32mI (2228) AUDIO_ELEMENT: [i2s] Element task created[0m
[0;32mI (2228) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:260, MEM Total:190356 Bytes
[0m
[0;32mI (2238) AUDIO_ELEMENT: [mp3] AEL_MSG_CMD_RESUME,state:1[0m
[0;32mI (2248) MP3_DECODER: MP3 opened[0m
[0;32mI (2248) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:1[0m
[0;32mI (2258) I2S_STREAM: AUDIO_STREAM_WRITER[0m
[0;32mI (2258) AUDIO_PIPELINE: Pipeline started[0m
[0;32mI (2298) I2S: APLL: Req RATE: 16000, real rate: 15999.022, BITS: 16, CLKM: 1, BCK: 8, MCLK: 4096000.000, SCLK: 511968.718750, diva: 1, divb: 0[0m
[0;32mI (2298) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:3[0m
[0;32mI (2308) I2S_STREAM: AUDIO_STREAM_WRITER[0m
I (4308) wifi: pm start, type:0
最近编辑记录 wenkumk (2018-07-10 14:29:27)
离线
我记得log会显示路由器ssid,ip地址以及网关,
可是你上面什么都没有?
有的,只是我后面编辑删了
离线
API Key
Secret Key
也是用我上面的?
是的呢
离线
API Key
Secret Key
也是用我上面的?
晕哥 录音是按Rec键进行录音是吗?
离线
晕哥 说:API Key
Secret Key
也是用我上面的?是的呢
还是没有声音。。
离线
https://whycan.cn/t_1098.html#p4879
测试这个本地音乐播放,判断声卡和功放是否正常。
声卡是没问题的,我试过mp3那个例程
离线
那看不出来问题.
原来是他们之前的有bug,现在重新更新了ADF就好了,有毒的官方
离线