Skip to content

Commit 9f36e84

Browse files
authored
Refactor AudioQnA README (#1508)
Signed-off-by: Spycsh <sihan.chen@intel.com>
1 parent 8c547c2 commit 9f36e84

File tree

3 files changed

+34
-10
lines changed

3 files changed

+34
-10
lines changed

AudioQnA/docker_compose/intel/cpu/xeon/README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Intel Xeon optimized image hosted in huggingface repo will be used for TGI servi
2525

2626
```bash
2727
docker build -t opea/speecht5:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/src/integrations/dependency/speecht5/Dockerfile .
28+
29+
# multilang tts (optional)
30+
docker build -t opea/gpt-sovits:latest --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy -f comps/tts/src/integrations/dependency/gpt-sovits/Dockerfile .
2831
```
2932

3033
### 5. Build MegaService Docker Image
@@ -42,6 +45,7 @@ Then run the command `docker images`, you will have following images ready:
4245
1. `opea/whisper:latest`
4346
2. `opea/speecht5:latest`
4447
3. `opea/audioqna:latest`
48+
4. `opea/gpt-sovits:latest` (optional)
4549

4650
## 🚀 Set the environment variables
4751

@@ -57,9 +61,11 @@ export MEGA_SERVICE_HOST_IP=${host_ip}
5761
export WHISPER_SERVER_HOST_IP=${host_ip}
5862
export SPEECHT5_SERVER_HOST_IP=${host_ip}
5963
export LLM_SERVER_HOST_IP=${host_ip}
64+
export GPT_SOVITS_SERVER_HOST_IP=${host_ip}
6065

6166
export WHISPER_SERVER_PORT=7066
6267
export SPEECHT5_SERVER_PORT=7055
68+
export GPT_SOVITS_SERVER_PORT=9880
6369
export LLM_SERVER_PORT=3006
6470

6571
export BACKEND_SERVICE_ENDPOINT=http://${host_ip}:3008/v1/audioqna
@@ -74,16 +80,20 @@ Note: Please replace with host_ip with your external IP address, do not use loca
7480
```bash
7581
cd GenAIExamples/AudioQnA/docker_compose/intel/cpu/xeon/
7682
docker compose up -d
83+
84+
# multilang tts (optional)
85+
docker compose -f compose_multilang.yaml up -d
7786
```
7887

7988
## 🚀 Test MicroServices
8089

8190
```bash
8291
# whisper service
83-
curl http://${host_ip}:7066/v1/asr \
84-
-X POST \
85-
-d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"}' \
86-
-H 'Content-Type: application/json'
92+
wget https://github.com/intel/intel-extension-for-transformers/raw/main/intel_extension_for_transformers/neural_chat/assets/audio/sample.wav
93+
curl http://${host_ip}:7066/v1/audio/transcriptions \
94+
-H "Content-Type: multipart/form-data" \
95+
-F file="@./sample.wav" \
96+
-F model="openai/whisper-small"
8797

8898
# tgi service
8999
curl http://${host_ip}:3006/generate \
@@ -92,11 +102,10 @@ curl http://${host_ip}:3006/generate \
92102
-H 'Content-Type: application/json'
93103

94104
# speecht5 service
95-
curl http://${host_ip}:7055/v1/tts \
96-
-X POST \
97-
-d '{"text": "Who are you?"}' \
98-
-H 'Content-Type: application/json'
105+
curl http://${host_ip}:7055/v1/audio/speech -XPOST -d '{"input": "Who are you?"}' -H 'Content-Type: application/json' --output speech.mp3
99106

107+
# gpt-sovits service (optional)
108+
curl http://${host_ip}:9880/v1/audio/speech -XPOST -d '{"input": "Who are you?"}' -H 'Content-Type: application/json' --output speech.mp3
100109
```
101110

102111
## 🚀 Test MegaService
@@ -106,7 +115,8 @@ base64 string to the megaservice endpoint. The megaservice will return a spoken
106115
to the response, decode the base64 string and save it as a .wav file.
107116

108117
```bash
109-
# voice can be "default" or "male"
118+
# if you are using speecht5 as the tts service, voice can be "default" or "male"
119+
# if you are using gpt-sovits for the tts service, you can set the reference audio following https://github.com/opea-project/GenAIComps/blob/main/comps/tts/src/integrations/dependency/gpt-sovits/README.md
110120
curl http://${host_ip}:3008/v1/audioqna \
111121
-X POST \
112122
-d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64, "voice":"default"}' \

AudioQnA/docker_compose/intel/cpu/xeon/compose_multilang.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,20 @@ services:
5858
- GPT_SOVITS_SERVER_PORT=${GPT_SOVITS_SERVER_PORT}
5959
ipc: host
6060
restart: always
61-
61+
audioqna-xeon-ui-server:
62+
image: ${REGISTRY:-opea}/audioqna-ui:${TAG:-latest}
63+
container_name: audioqna-xeon-ui-server
64+
depends_on:
65+
- audioqna-xeon-backend-server
66+
ports:
67+
- "5175:5173"
68+
environment:
69+
- no_proxy=${no_proxy}
70+
- https_proxy=${https_proxy}
71+
- http_proxy=${http_proxy}
72+
- CHAT_URL=${BACKEND_SERVICE_ENDPOINT}
73+
ipc: host
74+
restart: always
6275
networks:
6376
default:
6477
driver: bridge

docker_images_list.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Take ChatQnA for example. ChatQnA is a chatbot application service based on the
6565
| [opea/feedbackmanagement-mongo](https://hub.docker.com/r/opea/feedbackmanagement-mongo) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/feedback_management/src/Dockerfile) | The docker image exposes that the OPEA feedback management microservice uses a MongoDB database for GenAI applications. |
6666
| [opea/finetuning](https://hub.docker.com/r/opea/finetuning) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/finetuning/src/Dockerfile) | The docker image exposed the OPEA Fine-tuning microservice for GenAI application use |
6767
| [opea/finetuning-gaudi](https://hub.docker.com/r/opea/finetuning-gaudi) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/finetuning/src/Dockerfile.intel_hpu) | The docker image exposed the OPEA Fine-tuning microservice for GenAI application use on the Gaudi |
68+
| [opea/gpt-sovits](https://hub.docker.com/r/opea/gpt-sovits) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/tts/src/integrations/dependency/gpt-sovits/Dockerfile) | The docker image exposed the OPEA GPT-SoVITS service for GenAI application use |
6869
| [opea/guardrails](https://hub.docker.com/r/opea/guardrails) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/guardrails/src/guardrails/Dockerfile) | The docker image exposed the OPEA guardrail microservice for GenAI application use |
6970
| [opea/guardrails-toxicity-predictionguard](https://hub.docker.com/r/opea/guardrails-toxicity-predictionguard) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/guardrails/src/toxicity_detection/Dockerfile) | The docker image exposed the OPEA guardrail microservice to provide toxicity detection for GenAI application use |
7071
| [opea/guardrails-pii-predictionguard](https://hub.docker.com/r/opea/guardrails-pii-predictionguard) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/guardrails/src/pii_detection/Dockerfile) | The docker image exposed the OPEA guardrail microservice to provide PII detection for GenAI application use |

0 commit comments

Comments
 (0)