您尚未登录。

#3 Re: ESP32/ESP8266 » 录音上传,adf中的pipeline_raw_http,如何搭建一个可以看到上传的录音服务器。 » 2018-07-17 14:25:59

晕哥 说:

这个难度不大, 我找个时间弄个 step by step记录.

运行了里面的server.py,然后修改一下运行可以了自己需要的端口号,和ip就可以了。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>E/
'E' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

C:\Users\Administrator>E:

E:\>cd ESP32

E:\ESP32>cd ADF/

E:\ESP32\ADF>ls
'ls' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

E:\ESP32\ADF>cd esp-adf

E:\ESP32\ADF\esp-adf>cd examples

E:\ESP32\ADF\esp-adf\examples>cd recorder

E:\ESP32\ADF\esp-adf\examples\recorder>cd pipeline_raw_http

E:\ESP32\ADF\esp-adf\examples\recorder\pipeline_raw_http>python server.py
Serving HTTP on 0.0.0.0 port 8000
Traceback (most recent call last):
  File "server.py", line 76, in <module>
    httpd.serve_forever()
  File "C:\Python27\lib\SocketServer.py", line 231, in serve_forever
    poll_interval)
  File "C:\Python27\lib\SocketServer.py", line 150, in _eintr_retry
    return func(*args)
KeyboardInterrupt

E:\ESP32\ADF\esp-adf\examples\recorder\pipeline_raw_http>python server.py -place

Serving HTTP on 0.0.0.0 port 8000
Traceback (most recent call last):
  File "server.py", line 76, in <module>
    httpd.serve_forever()
  File "C:\Python27\lib\SocketServer.py", line 231, in serve_forever
    poll_interval)
  File "C:\Python27\lib\SocketServer.py", line 150, in _eintr_retry
    return func(*args)
KeyboardInterrupt

E:\ESP32\ADF\esp-adf\examples\recorder\pipeline_raw_http>run python server.py
'run' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

E:\ESP32\ADF\esp-adf\examples\recorder\pipeline_raw_http>python E:\ESP32\ADF\esp
-adf\examples\recorder\pipeline_raw_http\server.py
Serving HTTP on 0.0.0.0 port 8000
Traceback (most recent call last):
  File "E:\ESP32\ADF\esp-adf\examples\recorder\pipeline_raw_http\server.py", lin
e 76, in <module>
    httpd.serve_forever()
  File "C:\Python27\lib\SocketServer.py", line 231, in serve_forever
    poll_interval)
  File "C:\Python27\lib\SocketServer.py", line 150, in _eintr_retry
    return func(*args)
KeyboardInterrupt

E:\ESP32\ADF\esp-adf\examples\recorder\pipeline_raw_http>python server.py
Serving HTTP on 192.168.3.57 port 8899
Audio information, sample rates: 16000, bits: 16, channel(s): 2
Total bytes received: 1024
[FTotal bytes received: 2048
[FTotal bytes received: 3072
[FTotal bytes received: 4096
[FTotal bytes received: 5120
[FTotal bytes received: 6144
[FTotal bytes received: 7168
[FTotal bytes received: 8192
[FTotal bytes received: 9216
[FTotal bytes received: 10240
[FTotal bytes received: 11264
[FTotal bytes received: 12288
[FTotal bytes received: 13312
[FTotal bytes received: 14336
[FTotal bytes received: 14336
[F192.168.3.63 - - [17/Jul/2018 14:23:44] "POST /upload HTTP/1.1" 200 -


感谢晕哥提醒。

#4 Re: ESP32/ESP8266 » 录音上传,adf中的pipeline_raw_http,如何搭建一个可以看到上传的录音服务器。 » 2018-07-17 14:05:31

晕哥 说:

现在问题是不能录音,还是 http 上传出问题?

https://github.com/espressif/esp-adf/tree/master/examples/recorder/pipeline_raw_http

我看了一下demo, 就是用python脚本建立一个服务器, esp32通过wifi发送音频数据到服务器.

其实我就是不知道怎么用python脚本建立一个服务器。望晕哥指教。

#5 ESP32/ESP8266 » 录音上传,adf中的pipeline_raw_http,如何搭建一个可以看到上传的录音服务器。 » 2018-07-17 11:38:31

wenkumk
回复: 7

如标题,求大神们指导,丑新,搞了两天都不行,要么让同事帮忙,然后上传出现enctype=multipart/form-data。。

#6 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-17 10:03:30

晕哥 说:

录音根据例程问题应该不大,找个时间我试一试。

你的dueros跑起来了吗?

跑起来了,只是识别有时候好有时候不好,问天气,百科都好。然后就是如果要播放音乐的话,就需要将设备认证才行。

#7 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-16 11:16:39

晕哥 说:

感谢提醒,我回去试一试。


晕哥,方便解析一下录音上传的流程不,附上代码解析就更好了,:D

#8 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-16 09:54:30

晕哥 说:

rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:5764
load:0x40078000,len:0
load:0x40078000,len:14032
entry 0x40078ff0
I (28) boot: ESP-IDF v3.0.1 2nd stage bootloader
I (28) boot: compile time 21:16:03
I (30) boot: Enabling RNG early entropy source...
I (32) qio_mode: Enabling QIO for flash chip GD
I (38) boot: SPI Speed      : 80MHz
I (42) boot: SPI Mode       : QIO
I (46) boot: SPI Flash Size : 8MB
I (50) boot: Partition Table:
I (53) boot: ## Label            Usage          Type ST Offset   Length
I (61) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (68) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (76) boot:  2 factory          factory app      00 00 00010000 00100000
I (83) boot: End of partition table
I (87) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x43bb8 (277432) map
I (169) esp_image: segment 1: paddr=0x00053be0 vaddr=0x3ffb0000 size=0x0382c ( 14380) load
I (174) esp_image: segment 2: paddr=0x00057414 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at C:/projects/esp-adf/esp-idf/components/freertos/xtensa_vectors.S:1685

I (176) esp_image: segment 3: paddr=0x0005781c vaddr=0x40080400 size=0x087f4 ( 34804) load
I (196) esp_image: segment 4: paddr=0x00060018 vaddr=0x400d0018 size=0xfa5d4 (1025492) map
0x400d0018: _flash_cache_start at ??:?

I (467) esp_image: segment 5: paddr=0x0015a5f4 vaddr=0x40088bf4 size=0x08ce8 ( 36072) load
0x40088bf4: xTaskCreatePinnedToCore at C:/projects/esp-adf/esp-idf/components/freertos/tasks.c:4494 (discriminator 2)

I (479) esp_image: segment 6: paddr=0x001632e4 vaddr=0x400c0000 size=0x00000 (     0) load
E (479) esp_image: Image length 1389328 doesn't fit in partition length 1048576
E (484) boot: Factory app partition is not bootable
E (490) boot: No bootable app partitions in the partition table
user code done

https://whycan.cn/files/members/3/QQ20180713213410.png

一番折腾之后,居然出错了。

这个需要修改:
1.$IDF_PATH/components/partition_table/partitions_singleapp.csv

# Name,   Type, SubType, Offset,  Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs,      data, nvs,     0x9000,  0x6000,
phy_init, data, phy,     0xf000,  0x1000,
factory,  app,  factory, 0x10000, 2M,//这里原本是0x10000的,但是会报Factory app partition is not bootable,所以需要修改为2M,

还有就是现在不能播音乐了,要认证才可以播,但是现在那识别率真心忧伤。

#9 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-13 18:17:43

晕哥 说:

https://whycan.cn/files/members/3/QQ20180707114321.png

百度dueros 申请了开发者账号,但是没有发现能下载到楼上格式的文件.

晕哥,在设备生产那里就可以生成profile文件,然后替换mian里面的duer_profile文件的内容替换就好了,现在是明明开启了音乐播放功能,然后提示没有开启这个内容,还有就是官方的例程识别真心坑爹。

#10 Re: ESP32/ESP8266 » 阔别两个月,再度归来,请问play_baidu_speech_mp3_example.c 这个例程如何启动? » 2018-07-11 15:44:19

晕哥 说:

那看不出来问题.

原来是他们之前的有bug,现在重新更新了ADF就好了,有毒的官方

#11 Re: ESP32/ESP8266 » 阔别两个月,再度归来,请问play_baidu_speech_mp3_example.c 这个例程如何启动? » 2018-07-11 08:10:35

晕哥 说:

https://whycan.cn/t_1098.html#p4879

测试这个本地音乐播放,判断声卡和功放是否正常。

声卡是没问题的,我试过mp3那个例程

#12 Re: ESP32/ESP8266 » 阔别两个月,再度归来,请问play_baidu_speech_mp3_example.c 这个例程如何启动? » 2018-07-10 18:17:00

wenkumk 说:
晕哥 说:

API Key
Secret Key
也是用我上面的?

是的呢


还是没有声音。。

#13 Re: ESP32/ESP8266 » 阔别两个月,再度归来,请问play_baidu_speech_mp3_example.c 这个例程如何启动? » 2018-07-10 16:03:43

晕哥 说:

API Key
Secret Key
也是用我上面的?

晕哥 录音是按Rec键进行录音是吗?

#15 Re: ESP32/ESP8266 » 阔别两个月,再度归来,请问play_baidu_speech_mp3_example.c 这个例程如何启动? » 2018-07-10 15:05:16

晕哥 说:

我记得log会显示路由器ssid,ip地址以及网关,
可是你上面什么都没有?

有的,只是我后面编辑删了

#16 Re: ESP32/ESP8266 » 阔别两个月,再度归来,请问play_baidu_speech_mp3_example.c 这个例程如何启动? » 2018-07-10 14:28:51

我的上电没有提示音,难受中,也没有显示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

#17 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-06 16:51:20

晕哥 说:
wenkumk 说:
晕哥 说:

那不错,以前还听说不开源,可以玩一玩。


那就催更了,其实看他们的readme还是不很懂

这个可以有.


https://github.com/espressif/esp-adf/tree/master/examples/dueros

DuerOS3.0 Example.
This example shows how to use ADF APIs to connect DuerOS3.0 To run this example you need ESP32 LyraT or compatible board:

Setup Wi-Fi SSID and Password.
Connect speakers or headphone to the board.
Select your DuerOS device profile instead of ADF_APTH/examples/dueros/main/duer_profile. If you have not, please refer to DuerOS Developer Certification Guide apply for the DuerOS developer.

Supported Features
Press [Rec] button to talk to DuerOS. The device will playback the DuerOS response. You can say anything what do you want, e.g."今天天气怎么样?" or "现在几点了?", what means "What's the weather?" or " what time is it?".
Wi-Fi Status indicate by green led. Wi-Fi connected green led turn on, disconnect with normal blink, setting will be fast blink.
Adjust volume by by touching [Vol-] or [Vol+]
Config Wi-Fi by [Set] button
Note:
DuerOS profile is device unique ID.

是滴 主要是这里面的Select your DuerOS device profile instead of ADF_APTH/examples/dueros/main/duer_profile. If you have not, please refer to DuerOS Developer Certification Guide apply for the DuerOS developer.不知道怎么操作,已经申请开发者中。

#18 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-06 14:07:41

晕哥 说:

那不错,以前还听说不开源,可以玩一玩。


那就催更了,其实看他们的readme还是不很懂

#19 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-06 10:32:36

晕哥 说:
wenkumk 说:

duerOs在github上更新了,求晕哥弄个帖子搞一下,是在是搞不了,就那个duer_profile需要怎么弄呢

https://github.com/dueros
这个移植到 esp32 ?


是ESP32的ADF更新了,duerOs

#20 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-06 08:46:32

duerOs在github上更新了,求晕哥弄个帖子搞一下,是在是搞不了,就那个duer_profile需要怎么弄呢

#23 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-05-30 17:12:44

好奇是录音文件是一边录一遍传,还是说,通过VDA判断后,在整体传的

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn