如标题,求大神们指导,丑新,搞了两天都不行,要么让同事帮忙,然后上传出现enctype=multipart/form-data。。
离线
现在问题是不能录音,还是 http 上传出问题?
https://github.com/espressif/esp-adf/tree/master/examples/recorder/pipeline_raw_http
我看了一下demo, 就是用python脚本建立一个服务器, esp32通过wifi发送音频数据到服务器.
其实我就是不知道怎么用python脚本建立一个服务器。望晕哥指教。
离线
这个难度不大, 我找个时间弄个 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 -
感谢晕哥提醒。
离线
恭喜你,成功了!
pc上面是不是录到wav文件?
是的
离线