From c33edd2ed102b0c65ad0c28158520d33ed74c027 Mon Sep 17 00:00:00 2001 From: sunshinexcode <24xinhui@163.com> Date: Fri, 26 Jul 2024 16:18:02 +0800 Subject: [PATCH 1/5] feat(): support docker-compose --- .gitignore | 1 + Makefile | 14 ++++++++++++-- docker-compose.yml.example | 31 +++++++++++++++++++++++++++++++ playground/.dockerignore | 3 +++ playground/.gitignore | 2 -- playground/Dockerfile | 27 +++++++++++++++++++++++++++ playground/next.config.mjs | 1 + 7 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 docker-compose.yml.example create mode 100644 playground/.dockerignore create mode 100644 playground/Dockerfile diff --git a/.gitignore b/.gitignore index 33708b7b..6217b5c0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ bin/ core crash_context_v1 .deps/ +docker-compose.yml .DS_Store .env /.gn diff --git a/Makefile b/Makefile index 7e3e4514..5c76b0e5 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PROJECT_NAME := astra PROJECT_VERSION ?= "0.1."$(shell date -u +'%Y%m%d%H') REGISTRY ?= agoraio/ -.PHONY: build build-agents build-server docker-build-server run-server +.PHONY: build build-agents build-playground build-server clean clean-agents docker-build-playground docker-build-server run-server build: build-agents build-server @@ -11,6 +11,11 @@ build-agents: cd agents && ./scripts/install_deps_and_build.sh linux x64 && mv bin/main bin/worker @echo ">> done" +build-playground: + @echo ">> build playground" + cd playground && npm i && npm run build + @echo ">> done" + build-server: @echo ">> build server" cd server && go mod tidy && go mod download && go build -o bin/api main.go @@ -23,9 +28,14 @@ clean-agents: rm -rf agents/manifest.json agents/bin agents/out agents/interface agents/include agents/lib agents/lib64 agents/addon/system agents/addon/extension_group agents/.release @echo ">> done" +docker-build-playground: + @echo ">> docker build playground" + cd playground && docker build -t $(REGISTRY)$(PROJECT_NAME)_playground:$(PROJECT_VERSION) -f Dockerfile . + @echo ">> done" + docker-build-server: @echo ">> docker build server" - docker build -t $(REGISTRY)$(PROJECT_NAME):$(PROJECT_VERSION) --platform linux/amd64 -f Dockerfile . + docker build -t $(REGISTRY)$(PROJECT_NAME)_agents_server:$(PROJECT_VERSION) --platform linux/amd64 -f Dockerfile . @echo ">> done" run-server: diff --git a/docker-compose.yml.example b/docker-compose.yml.example new file mode 100644 index 00000000..8d3df330 --- /dev/null +++ b/docker-compose.yml.example @@ -0,0 +1,31 @@ +version: "3.8" + +services: + astra_agents_server: + image: agoraio/astra_agents_server:latest + container_name: astra_agents_server + restart: always + ports: + - "8080:8080" + volumes: + - /tmp:/tmp + environment: + AGORA_APP_ID: + AGORA_APP_CERTIFICATE: + AZURE_STT_KEY: + AZURE_STT_REGION: + OPENAI_API_KEY: + # TTS vendor: azure/elevenlabs + TTS_VENDOR_CHINESE: azure + TTS_VENDOR_ENGLISH: azure + # if you choose azure, you need to provide the following keys + AZURE_TTS_KEY: + AZURE_TTS_REGION: + # if you choose elevenlabs, you need to provide the following key + ELEVENLABS_TTS_KEY: + astra_playground: + image: agoraio/astra_playground:latest + container_name: astra_playground + restart: always + ports: + - "3000:3000" diff --git a/playground/.dockerignore b/playground/.dockerignore new file mode 100644 index 00000000..80ae13ce --- /dev/null +++ b/playground/.dockerignore @@ -0,0 +1,3 @@ +.git +.next +node_modules diff --git a/playground/.gitignore b/playground/.gitignore index 8ea5936b..2b3a23bf 100644 --- a/playground/.gitignore +++ b/playground/.gitignore @@ -132,5 +132,3 @@ dist # lock package-lock.json yarn.lock - -Dockerfile diff --git a/playground/Dockerfile b/playground/Dockerfile new file mode 100644 index 00000000..1bc3ba7d --- /dev/null +++ b/playground/Dockerfile @@ -0,0 +1,27 @@ +FROM node:20-alpine AS base + +FROM base AS builder + +WORKDIR /app + +COPY .env.example .env +COPY . . + +RUN npm i && \ + npm run build + + +FROM base AS runner + +WORKDIR /app + +ENV NODE_ENV production + +RUN mkdir .next + +COPY --from=builder /app/.next/standalone ./ +COPY --from=builder /app/.next/static ./.next/static + +EXPOSE 3000 + +CMD HOSTNAME="0.0.0.0" node server.js \ No newline at end of file diff --git a/playground/next.config.mjs b/playground/next.config.mjs index 7b0da182..4a5288eb 100644 --- a/playground/next.config.mjs +++ b/playground/next.config.mjs @@ -2,6 +2,7 @@ const nextConfig = { // basePath: '/ai-agent', // output: 'export', + output: 'standalone', reactStrictMode: false, webpack(config) { // Grab the existing rule that handles SVG imports From 23e5ef12f121ce457c27ab6cb584ee2b7f7bf89b Mon Sep 17 00:00:00 2001 From: sunshinexcode <24xinhui@163.com> Date: Fri, 26 Jul 2024 19:29:50 +0800 Subject: [PATCH 2/5] chore(): support docker compose --- Dockerfile | 4 +- README.md | 64 ++------ agents/manifest.json.cn.example | 269 -------------------------------- agents/manifest.json.en.example | 265 ------------------------------- server/internal/http_server.go | 13 +- server/main.go | 6 +- 6 files changed, 18 insertions(+), 603 deletions(-) delete mode 100644 agents/manifest.json.cn.example delete mode 100644 agents/manifest.json.en.example diff --git a/Dockerfile b/Dockerfile index 605bce58..621b9f6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,7 @@ WORKDIR /app COPY . . COPY agents/manifest.json.example agents/manifest.json -# COPY agents/manifest.json.elevenlabs.example agents/manifest.elevenlabs.json -COPY agents/manifest.json.cn.example agents/manifest.cn.json -COPY agents/manifest.json.en.example agents/manifest.en.json +COPY agents/manifest.json.elevenlabs.example agents/manifest.elevenlabs.json COPY agents/${SESSION_CONTROL_CONF} agents/session_control.conf RUN make build && \ diff --git a/README.md b/README.md index cb55c754..bd5e7200 100644 --- a/README.md +++ b/README.md @@ -53,34 +53,19 @@ To start, make sure you have: - Azure's [speech-to-text](https://azure.microsoft.com/en-us/products/ai-services/speech-to-text) and [text-to-speech](https://azure.microsoft.com/en-us/products/ai-services/text-to-speech) API keys - [OpenAI](https://openai.com/index/openai-api/) API key - [Docker](https://www.docker.com/) +- [Docker Compose](https://docs.docker.com/compose/) ```bash -# Run the pre-built agent image -docker run --restart=always -itd -p 8080:8080 \ - -v /tmp:/tmp \ - -e AGORA_APP_ID= \ - -e AGORA_APP_CERTIFICATE= \ - -e AZURE_STT_KEY= \ - -e AZURE_STT_REGION= \ - -e OPENAI_API_KEY= \ - -e AZURE_TTS_KEY= \ - -e AZURE_TTS_REGION= \ - --name astra_agents_server \ - agoraio/astra_agents_server:latest - -# Here are two TTS options, either one will work -# Make sure to comment out the one you don't use -# 1. using Azure --e TTS_VENDOR_CHINESE=azure --e AZURE_TTS_KEY= --e AZURE_TTS_REGION= - -# 2. using ElevenLabs --e TTS_VENDOR_ENGLISH=elevenlabs --e ELEVENLABS_TTS_KEY= +# Copy the docker-compose.yml.example file to a new file named docker-compose.yml +cp ./docker-compose.yml.example ./docker-compose.yml +# Execute docker compose up to start the services +docker compose up ``` -This should start an agent server running on port 8080. +This should start an playground running on port 3000 and agent server running on port 8080. +
+🎉 Congratulations! You now have a ASTRA powered voice agent running locally, access the DASTRA in your browser at http://localhost:3000 + #### Mac with Apple Silicon @@ -92,23 +77,6 @@ You will need to uncheck "Use Rosetta for x86_64/amd64 emulation on apple silico -

Connect to Your Agent

- -You can use the showcase voice agent, in `/playground` folder, to test with the server you just started. - -The project is built on NextJS 14, hence it needs Node 18 or later. - -```bash -# Set up an .env file -cp ./playground/.env.example ./playground/.env -cd playground - -# Install npm dependencies & start -npm i && npm run dev -``` - -🎉 Congratulations! You now have a ASTRA powered voice agent running locally. -

Agent Customization

@@ -137,8 +105,7 @@ You need to prepare the proper `manifest.json` file first. ```bash # Rename manifest example cp ./agents/manifest.json.example ./agents/manifest.json -cp ./agents/manifest.json.en.example ./agents/manifest.en.json -cp ./agents/manifest.json.cn.example ./agents/manifest.cn.json +cp ./agents/manifest.json.elevenlabs.example ./agents/manifest.json.elevenlabs.example # pull the docker image with dev tools and mount your current folder as workspace docker run -itd -v $(pwd):/app -w /app -p 8080:8080 --name astra_agents_dev ghcr.io/rte-design/astra_agents_build @@ -160,15 +127,13 @@ The above code generates an agent executable. To customize your prompts and Open Once you have made the necessary changes, you can use the following commands to start a server. You can then test it out using the ASTRA voice agent from the showcase. ```bash -# TODO: need to refactor the contents +# TODO: need to refactor the contents # Agora App ID and Agora App Certificate export AGORA_APP_ID= export AGORA_APP_CERTIFICATE= # OpenAI API key export OPENAI_API_KEY= -# Or QWEN key -export QWEN_API_KEY= # Azure STT key and region export AZURE_STT_KEY= @@ -187,11 +152,7 @@ export AZURE_TTS_REGION= export TTS_VENDOR_ENGLISH=elevenlabs export ELEVENLABS_TTS_KEY= -# 3. using Cosy -export COSY_TTS_KEY= - # agent is ready to start on port 8080 - make run-server ``` @@ -204,8 +165,7 @@ The default agent control is managed via server gateway. For quick testing, you # rename manifest example cp ./agents/manifest.json.example ./agents/manifest.json -cp ./agents/manifest.json.en.example ./agents/manifest.en.json -cp ./agents/manifest.json.cn.example ./agents/manifest.cn.json +cp ./agents/manifest.json.elevenlabs.example ./agents/manifest.json.elevenlabs.example # pull the docker image with dev tools and mount your current folder as workspace docker run -itd -v $(pwd):/app -w /app -p 8080:8080 --name astra_agents_dev ghcr.io/rte-design/astra_agents_build diff --git a/agents/manifest.json.cn.example b/agents/manifest.json.cn.example deleted file mode 100644 index 4127fc02..00000000 --- a/agents/manifest.json.cn.example +++ /dev/null @@ -1,269 +0,0 @@ -{ - "type": "app", - "name": "astra_agents", - "version": "0.2.0", - "language": "go", - "dependencies": [ - { - "type": "system", - "name": "rte_runtime_python", - "version": "0.3.1" - }, - { - "type": "system", - "name": "rte_runtime_go", - "version": "0.3.1" - }, - { - "type": "extension", - "name": "py_init_extension_cpp", - "version": "0.3.1" - }, - { - "type": "extension_group", - "name": "default_extension_group", - "version": "0.3.1" - }, - { - "type": "extension", - "name": "agora_rtc", - "version": "0.3.0-rc1" - } - ], - "predefined_graphs": [ - { - "name": "astra_agents", - "auto_start": true, - "nodes": [ - { - "type": "extension", - "extension_group": "default", - "addon": "agora_rtc", - "name": "agora_rtc", - "property": { - "app_id": "", - "token": "", - "channel": "astra_agents_test", - "stream_id": 1234, - "remote_stream_id": 123, - "subscribe_audio": true, - "publish_audio": true, - "publish_data": true, - "enable_agora_asr": true, - "agora_asr_vendor_name": "microsoft", - "agora_asr_language": "zh-CN", - "agora_asr_vendor_key": "", - "agora_asr_vendor_region": "", - "agora_asr_session_control_file_path": "session_control.conf" - } - }, - { - "type": "extension", - "extension_group": "llm", - "addon": "qwen_llm_python", - "name": "qwen_llm", - "property": { - "api_key": "", - "model": "qwen-max", - "max_tokens": 512, - "prompt": "", - "max_memory_length": 10 - } - }, - { - "type": "extension", - "extension_group": "tts", - "addon": "cosy_tts", - "name": "cosy_tts", - "property": { - "api_key": "", - "model": "cosyvoice-v1", - "voice": "longxiaochun", - "sample_rate": 16000 - } - }, - { - "type": "extension", - "extension_group": "chat_transcriber", - "addon": "chat_transcriber_python", - "name": "chat_transcriber" - }, - { - "type": "extension", - "extension_group": "default", - "addon": "interrupt_detector_python", - "name": "interrupt_detector" - }, - { - "type": "extension_group", - "addon": "default_extension_group", - "name": "default" - }, - { - "type": "extension_group", - "addon": "default_extension_group", - "name": "llm" - }, - { - "type": "extension_group", - "addon": "default_extension_group", - "name": "tts" - }, - { - "type": "extension_group", - "addon": "default_extension_group", - "name": "chat_transcriber" - } - ], - "connections": [ - { - "extension_group": "default", - "extension": "agora_rtc", - "data": [ - { - "name": "text_data", - "dest": [ - { - "extension_group": "default", - "extension": "interrupt_detector" - }, - { - "extension_group": "chat_transcriber", - "extension": "chat_transcriber" - } - ] - } - ], - "pcm_frame": [ - { - "name": "pcm_frame", - "dest": [ - { - "extension_group": "default", - "extension": "interrupt_detector" - } - ] - } - ] - }, - { - "extension_group": "default", - "extension": "interrupt_detector", - "cmd": [ - { - "name": "flush", - "dest": [ - { - "extension_group": "llm", - "extension": "qwen_llm" - } - ] - } - ], - "data": [ - { - "name": "text_data", - "dest": [ - { - "extension_group": "llm", - "extension": "qwen_llm" - } - ] - } - ] - }, - { - "extension_group": "llm", - "extension": "qwen_llm", - "data": [ - { - "name": "text_data", - "dest": [ - { - "extension_group": "tts", - "extension": "cosy_tts" - }, - { - "extension_group": "chat_transcriber", - "extension": "chat_transcriber", - "cmd_conversions": [ - { - "cmd": { - "type": "per_property", - "keep_original": true, - "rules": [ - { - "path": "is_final", - "type": "fixed_value", - "value": "bool(true)" - }, - { - "path": "stream_id", - "type": "fixed_value", - "value": "uint32(999)" - } - ] - } - } - ] - } - ] - } - ], - "cmd": [ - { - "name": "flush", - "dest": [ - { - "extension_group": "tts", - "extension": "cosy_tts" - } - ] - } - ] - }, - { - "extension_group": "tts", - "extension": "cosy_tts", - "pcm_frame": [ - { - "name": "pcm_frame", - "dest": [ - { - "extension_group": "default", - "extension": "agora_rtc" - } - ] - } - ], - "cmd": [ - { - "name": "flush", - "dest": [ - { - "extension_group": "default", - "extension": "agora_rtc" - } - ] - } - ] - }, - { - "extension_group": "chat_transcriber", - "extension": "chat_transcriber", - "data": [ - { - "name": "data", - "dest":[ - { - "extension_group": "default", - "extension": "agora_rtc" - } - ] - } - ] - } - ] - } - ] -} diff --git a/agents/manifest.json.en.example b/agents/manifest.json.en.example deleted file mode 100644 index 8bbd42ba..00000000 --- a/agents/manifest.json.en.example +++ /dev/null @@ -1,265 +0,0 @@ -{ - "type": "app", - "name": "astra_agents", - "version": "0.2.0", - "language": "go", - "dependencies": [ - { - "type": "system", - "name": "rte_runtime_python", - "version": "0.3.1" - }, - { - "type": "system", - "name": "rte_runtime_go", - "version": "0.3.1" - }, - { - "type": "extension", - "name": "py_init_extension_cpp", - "version": "0.3.1" - }, - { - "type": "extension_group", - "name": "default_extension_group", - "version": "0.3.1" - }, - { - "type": "extension", - "name": "agora_rtc", - "version": "0.3.0-rc1" - } - ], - "predefined_graphs": [ - { - "name": "astra_agents", - "auto_start": true, - "nodes": [ - { - "type": "extension", - "extension_group": "default", - "addon": "agora_rtc", - "name": "agora_rtc", - "property": { - "app_id": "", - "token": "", - "channel": "astra_agents_test", - "stream_id": 1234, - "remote_stream_id": 123, - "subscribe_audio": true, - "publish_audio": true, - "publish_data": true, - "enable_agora_asr": true, - "agora_asr_vendor_name": "microsoft", - "agora_asr_language": "en-US", - "agora_asr_vendor_key": "", - "agora_asr_vendor_region": "", - "agora_asr_session_control_file_path": "session_control.conf" - } - }, - { - "type": "extension", - "extension_group": "default", - "addon": "interrupt_detector", - "name": "interrupt_detector" - }, - { - "type": "extension", - "extension_group": "chatgpt", - "addon": "openai_chatgpt", - "name": "openai_chatgpt", - "property": { - "base_url": "", - "api_key": "", - "frequency_penalty": 0.9, - "model": "gpt-3.5-turbo", - "max_tokens": 512, - "prompt": "", - "proxy_url": "", - "greeting": "ASTRA agent connected. How can i help you today?", - "max_memory_length": 10 - } - }, - { - "type": "extension", - "extension_group": "tts", - "addon": "azure_tts", - "name": "azure_tts", - "property": { - "azure_subscription_key": "", - "azure_subscription_region": "", - "azure_synthesis_voice_name": "en-US-JaneNeural" - } - }, - { - "type": "extension", - "extension_group": "transcriber", - "addon": "chat_transcriber", - "name": "chat_transcriber" - }, - { - "type": "extension_group", - "addon": "default_extension_group", - "name": "default" - }, - { - "type": "extension_group", - "addon": "default_extension_group", - "name": "chatgpt" - }, - { - "type": "extension_group", - "addon": "default_extension_group", - "name": "tts" - }, - { - "type": "extension_group", - "addon": "default_extension_group", - "name": "transcriber" - } - ], - "connections": [ - { - "extension_group": "default", - "extension": "agora_rtc", - "data": [ - { - "name": "text_data", - "dest": [ - { - "extension_group": "default", - "extension": "interrupt_detector" - }, - { - "extension_group": "chatgpt", - "extension": "openai_chatgpt" - }, - { - "extension_group": "transcriber", - "extension": "chat_transcriber" - } - ] - } - ], - "pcm_frame": [ - { - "name": "pcm_frame", - "dest": [ - { - "extension_group": "default", - "extension": "interrupt_detector" - } - ] - } - ] - }, - { - "extension_group": "chatgpt", - "extension": "openai_chatgpt", - "data": [ - { - "name": "text_data", - "dest": [ - { - "extension_group": "tts", - "extension": "azure_tts" - }, - { - "extension_group": "transcriber", - "extension": "chat_transcriber", - "cmd_conversions": [ - { - "cmd": { - "type": "per_property", - "keep_original": true, - "rules": [ - { - "path": "is_final", - "type": "fixed_value", - "value": "bool(true)" - }, - { - "path": "stream_id", - "type": "fixed_value", - "value": "uint32(999)" - } - ] - } - } - ] - } - ] - } - ], - "cmd": [ - { - "name": "flush", - "dest": [ - { - "extension_group": "tts", - "extension": "azure_tts" - } - ] - } - ] - }, - { - "extension_group": "tts", - "extension": "azure_tts", - "pcm_frame": [ - { - "name": "pcm_frame", - "dest": [ - { - "extension_group": "default", - "extension": "agora_rtc" - } - ] - } - ], - "cmd": [ - { - "name": "flush", - "dest": [ - { - "extension_group": "default", - "extension": "agora_rtc" - } - ] - } - ] - }, - { - "extension_group": "transcriber", - "extension": "chat_transcriber", - "data": [ - { - "name": "data", - "dest": [ - { - "extension_group": "default", - "extension": "agora_rtc" - } - ] - } - ] - }, - { - "extension_group": "default", - "extension": "interrupt_detector", - "cmd": [ - { - "name": "flush", - "dest": [ - { - "extension_group": "chatgpt", - "extension": "openai_chatgpt" - } - ] - } - ] - } - ] - } - ] -} diff --git a/server/internal/http_server.go b/server/internal/http_server.go index 924bcfdb..3158edd3 100644 --- a/server/internal/http_server.go +++ b/server/internal/http_server.go @@ -74,8 +74,6 @@ const ( ManifestJsonFile = "./agents/manifest.json" ManifestJsonFileElevenlabs = "./agents/manifest.elevenlabs.json" - ManifestJsonFileEN = "./agents/manifest.en.json" - ManifestJsonFileCN = "./agents/manifest.cn.json" TTSVendorAzure = "azure" TTSVendorElevenlabs = "elevenlabs" @@ -118,17 +116,12 @@ func NewHttpServer(httpServerConfig *HttpServerConfig) *HttpServer { } func (s *HttpServer) getManifestJsonFile(language string) (manifestJsonFile string) { - // ttsVendor := s.getTtsVendor(language) + ttsVendor := s.getTtsVendor(language) manifestJsonFile = ManifestJsonFile - if language == languageEnglish { - manifestJsonFile = ManifestJsonFileEN - } else if language == languageChinese { - manifestJsonFile = ManifestJsonFileCN + if ttsVendor == TTSVendorElevenlabs { + manifestJsonFile = ManifestJsonFileElevenlabs } - // if ttsVendor == TTSVendorElevenlabs { - // manifestJsonFile = ManifestJsonFileElevenlabs - // } return } diff --git a/server/main.go b/server/main.go index f7c6745f..2c3274d9 100644 --- a/server/main.go +++ b/server/main.go @@ -46,10 +46,8 @@ func main() { slog.Info("server config", "ttsVendorChinese", httpServerConfig.TTSVendorChinese, "ttsVendorEnglish", httpServerConfig.TTSVendorEnglish, "workersMax", httpServerConfig.WorkersMax, "workerQuitTimeoutSeconds", httpServerConfig.WorkerQuitTimeoutSeconds) - // processManifest(internal.ManifestJsonFile) - // processManifest(internal.ManifestJsonFileElevenlabs) - processManifest(internal.ManifestJsonFileEN) - processManifest(internal.ManifestJsonFileCN) + processManifest(internal.ManifestJsonFile) + processManifest(internal.ManifestJsonFileElevenlabs) httpServer := internal.NewHttpServer(httpServerConfig) httpServer.Start() } From ebf277bf30d9306e2050d10ee441b75f59daf743 Mon Sep 17 00:00:00 2001 From: sunshinexcode <24xinhui@163.com> Date: Fri, 26 Jul 2024 22:20:44 +0800 Subject: [PATCH 3/5] chore(): modify comment --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd5e7200..1e6a8ef6 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ To start, make sure you have: - [Docker Compose](https://docs.docker.com/compose/) ```bash -# Copy the docker-compose.yml.example file to a new file named docker-compose.yml +# Copy the docker-compose.yml.example file to a new file named docker-compose.yml, update the corresponding values in your docker-compose.yml file cp ./docker-compose.yml.example ./docker-compose.yml # Execute docker compose up to start the services docker compose up From b3713fdee0881da12c12a0f153f776be1cceb9e2 Mon Sep 17 00:00:00 2001 From: sunshinexcode <24xinhui@163.com> Date: Fri, 26 Jul 2024 22:31:54 +0800 Subject: [PATCH 4/5] chore(): add comments --- docker-compose.yml.example | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml.example b/docker-compose.yml.example index 8d3df330..d548cffb 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -10,18 +10,21 @@ services: volumes: - /tmp:/tmp environment: + # Agora App ID and Agora App Certificate AGORA_APP_ID: AGORA_APP_CERTIFICATE: + # Azure STT key and region AZURE_STT_KEY: AZURE_STT_REGION: + # OpenAI API key OPENAI_API_KEY: # TTS vendor: azure/elevenlabs TTS_VENDOR_CHINESE: azure TTS_VENDOR_ENGLISH: azure - # if you choose azure, you need to provide the following keys + # If you choose azure, you need to provide the following Azure STT key and region AZURE_TTS_KEY: AZURE_TTS_REGION: - # if you choose elevenlabs, you need to provide the following key + # If you choose elevenlabs, you need to provide the following Elevenlabs TTS key ELEVENLABS_TTS_KEY: astra_playground: image: agoraio/astra_playground:latest From a1d7e304199eec71968430f60b305c439a3b08d9 Mon Sep 17 00:00:00 2001 From: Ethan Zhang Date: Fri, 26 Jul 2024 22:33:56 +0800 Subject: [PATCH 5/5] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e6a8ef6..16e0c28d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ To start, make sure you have: - [Docker Compose](https://docs.docker.com/compose/) ```bash -# Copy the docker-compose.yml.example file to a new file named docker-compose.yml, update the corresponding values in your docker-compose.yml file +# Copy the docker-compose.yml.example file to a new file named docker-compose.yml +# remember to provide your api keys in your docker-compose.yml file cp ./docker-compose.yml.example ./docker-compose.yml # Execute docker compose up to start the services docker compose up