PaddlePaddle / PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.
https://paddlespeech.readthedocs.io
Apache License 2.0
10.86k stars 1.82k forks source link

Aborted connection 11 to db when running the code of demos/audio_searching/src/test_audio_search.py #3820

Open laliwang opened 1 month ago

laliwang commented 1 month ago

音频查找demo中无法与mysql database通信

我已经按照教程安装了paddlepaddle-gpu版以及paddlespeech,并且安装好了对应的docker依赖并且成功启动他们: [+] Running 5/0 ✔ Container milvus-etcd Running 0.0s ✔ Container milvus-minio Running 0.0s ✔ Container audio-mysql Running 0.0s ✔ Container audio-webclient Running 0.0s ✔ Container milvus-standalone Running 0.0s

紧接着我运行python src/audio_search.py 可以输出如下: INFO: Started server process [22764] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8002 (Press CTRL+C to quit)

然后我运行python ./src/test_audio_search.py 得到的输出如下 `Downloading https://paddlespeech.bj.bcebos.com/vector/audio/example_audio.tar.gz ... --2024-07-21 14:25:41-- https://paddlespeech.bj.bcebos.com/vector/audio/example_audio.tar.gz 正在解析主机 paddlespeech.bj.bcebos.com (paddlespeech.bj.bcebos.com)... 113.200.2.111, 119.249.103.5, 2409:8c04:1001:1203:0:ff:b0bb:4f27 正在连接 paddlespeech.bj.bcebos.com (paddlespeech.bj.bcebos.com)|113.200.2.111|:443... 已连接。 已发出 HTTP 请求,正在等待回应... 200 OK 长度: 440320 (430K) [application/x-gzip] 正在保存至: “./example_audio.tar.gz”

example_audio.tar.gz 100%[=============================================================>] 430.00K 1.67MB/s 用时 0.3s

2024-07-21 14:25:42 (1.67 MB/s) - 已保存 “./example_audio.tar.gz” [440320/440320])

MD5 Chesksum ./example_audio.tar.gz ... Unpacking ./example_audio.tar.gz ... W0721 14:25:42.517747 22295 gpu_resources.cc:96] The GPU architecture in your current machine is Pascal, which is not compatible with Paddle installation with arch: 70 75 80 86 , it is recommended to install the corresponding wheel package according to the installation information on the official Paddle website. W0721 14:25:42.517772 22295 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 11.6, Runtime API Version: 11.6 W0721 14:25:42.522830 22295 gpu_resources.cc:149] device: 0, cuDNN Version: 8.4. Extracting feature from audio No. 1 , 20 audios in total Extracting feature from audio No. 2 , 20 audios in total Extracting feature from audio No. 3 , 20 audios in total Extracting feature from audio No. 4 , 20 audios in total Extracting feature from audio No. 5 , 20 audios in total Extracting feature from audio No. 6 , 20 audios in total /home/wjh/PaddleSpeech/demos/audio_searching/src/encode.py:29: RuntimeWarning: divide by zero encountered in true_divide embedding = embedding / np.linalg.norm(embedding) Extracting feature from audio No. 7 , 20 audios in total Extracting feature from audio No. 8 , 20 audios in total Extracting feature from audio No. 9 , 20 audios in total Extracting feature from audio No. 10 , 20 audios in total Extracting feature from audio No. 11 , 20 audios in total Extracting feature from audio No. 12 , 20 audios in total Extracting feature from audio No. 13 , 20 audios in total Extracting feature from audio No. 14 , 20 audios in total Extracting feature from audio No. 15 , 20 audios in total Extracting feature from audio No. 16 , 20 audios in total Extracting feature from audio No. 17 , 20 audios in total Extracting feature from audio No. 18 , 20 audios in total Extracting feature from audio No. 19 , 20 audios in total Extracting feature from audio No. 20 , 20 audios in total Traceback (most recent call last): File "./src/test_audio_search.py", line 93, in test_count() File "./src/test_audio_search.py", line 69, in test_count assert response.json() == 20 AssertionError`

然后进一步查看docker日志发现我的主机和docker mysql database之间无法建立通信 2024-07-21T05:30:47.979844Z 0 [Note] Event Scheduler: Loaded 0 events 2024-07-21T05:30:47.980370Z 0 [Note] mysqld: ready for connections. Version: '5.7.36' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL) 2024-07-21T05:33:18.806576Z 3 [Note] Aborted connection 3 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T05:37:00.441137Z 2 [Note] Aborted connection 2 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T05:51:02.611489Z 5 [Note] Aborted connection 5 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T05:56:15.535693Z 4 [Note] Aborted connection 4 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T06:04:52.530018Z 7 [Note] Aborted connection 7 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T06:08:12.158312Z 6 [Note] Aborted connection 6 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T06:08:36.623535Z 9 [Note] Aborted connection 9 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T06:10:42.144944Z 8 [Note] Aborted connection 8 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T06:15:36.477397Z 11 [Note] Aborted connection 11 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T06:24:59.187555Z 10 [Note] Aborted connection 10 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T06:25:48.302426Z 13 [Note] Aborted connection 13 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets) 2024-07-21T06:26:30.303252Z 12 [Note] Aborted connection 12 to db: 'mysql' user: 'root' host: '172.16.23.1' (Got an error reading communication packets)

请问这可能是因为什么原因呢?我都是在我这台电脑上运行的所以config.py中的端口和ip都没有修改

Ray961123 commented 1 month ago

开发者你好,感谢关注 PaddleSpeech 开源项目,抱歉给你带来了不好的开发体验,目前开源项目维护人力有限,你可以尝试通过修改 PaddleSpeech 源码的方式自己解决,或请求开源社区其他开发者的协助。飞桨开源社区交流频道:飞桨AI Studio星河社区-人工智能学习与实训社区