|
| 1 | +:exclamation::exclamation: **This repo will no longer be maintained, please visit https://github.com/milvus-io/bootcamp** :exclamation: :exclamation: |
| 2 | + |
| 3 | +# Audio search system with Milvus |
| 4 | + |
| 5 | +This project uses [PANNs](https://github.com/qiuqiangkong/audioset_tagging_cnn)(Large-Scale Pretrained Audio Neural Networks) for Audio Pattern Recognition to perform audio tagging and sound event detection, finally obtaining audio embeddings. Then this project uses [Milvus](https://milvus.io/docs/v0.11.0/overview.md) to search for similar audio clips. |
| 6 | + |
| 7 | +## Local Deployment |
| 8 | + |
| 9 | +### Requirements |
| 10 | + |
| 11 | +- [Milvus 0.10.5](https://milvus.io/docs/v0.10.5/milvus_docker-cpu.md) (please note the Milvus version) |
| 12 | +- [MySQL](https://hub.docker.com/r/mysql/mysql-server) |
| 13 | +- [Python3](https://www.python.org/downloads/) |
| 14 | + |
| 15 | +### Run Server |
| 16 | + |
| 17 | +1. **Install python requirements** |
| 18 | + |
| 19 | + ```bash |
| 20 | + $ cd bootcamp/solutions/audio_search/webserver/ |
| 21 | + $ pip install -r audio_requirements.txt |
| 22 | + ``` |
| 23 | + |
| 24 | +2. **Modify configuration parameters** |
| 25 | + |
| 26 | + Before running the script, please modify the parameters in **webserver/audio/common/config.py**: |
| 27 | + |
| 28 | + | Parameter | Description | Default setting | |
| 29 | + | ------------ | ------------------------- | --------------- | |
| 30 | + | MILVUS_HOST | milvus service ip address | 127.0.0.1 | |
| 31 | + | MILVUS_PORT | milvus service port | 19530 | |
| 32 | + | MYSQL_HOST | mysql service ip | 127.0.0.1 | |
| 33 | + | MYSQL_PORT | mysql service port | 3306 | |
| 34 | + | MYSQL_USER | mysql user name | root | |
| 35 | + | MYSQL_PWD | mysql password | 123456 | |
| 36 | + | MYSQL_DB | mysql datebase name | mysql | |
| 37 | + | MILVUS_TABLE | default table name | milvus_audio | |
| 38 | + |
| 39 | +3. **Star server** |
| 40 | + |
| 41 | + ```bash |
| 42 | + $ cd webserver |
| 43 | + $ python main.py |
| 44 | + ``` |
| 45 | + |
| 46 | +## System Usage |
| 47 | + |
| 48 | +Type `127.0.0.1:8002/docs` in your browser to see all the APIs. |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +- Insert data. |
| 53 | + |
| 54 | + Download the sample [game_sound.zip](https://github.com/shiyu22/bootcamp/blob/0.11.0/solutions/audio_search/data/game_sound.zip?raw=true) and upload it into the system. |
| 55 | + |
| 56 | + > The sound data in the zip archive must be in wav format. |
| 57 | +
|
| 58 | +  |
| 59 | + |
| 60 | +- Search for similar audio clips. |
| 61 | + |
| 62 | + You can upload [test.wav](https://github.com/shiyu22/bootcamp/blob/0.11.0/solutions/audio_search/data/test.wav) to search for the most similar sound clips. |
| 63 | + |
| 64 | +  |
| 65 | + |
| 66 | +Please refer to https://zilliz.com/demos/ to take a try in the front-end interface. |
0 commit comments