From 03a54ef1838f3a96a89b6246cf163d5aebb6e999 Mon Sep 17 00:00:00 2001 From: Zhang Qianze Date: Tue, 12 Nov 2024 01:13:37 +0800 Subject: [PATCH] Revert "fix: Male voices and accents in OpenAI V2V (#393)" This reverts commit 7baa25dccfc8e6c606510ae1711e538bc2b760ff. --- .../extension/openai_v2v_python/extension.py | 16 +-- demo/src/app/api/agents/start/graph.tsx | 8 +- docker-compose.yml | 122 +++++++++--------- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/agents/ten_packages/extension/openai_v2v_python/extension.py b/agents/ten_packages/extension/openai_v2v_python/extension.py index 5c39968e..3ae55d71 100644 --- a/agents/ten_packages/extension/openai_v2v_python/extension.py +++ b/agents/ten_packages/extension/openai_v2v_python/extension.py @@ -484,14 +484,14 @@ def _fetch_properties(self, ten_env: TenEnv): try: voice = ten_env.get_property_string(PROPERTY_VOICE) if voice: - # v = DEFAULT_VOICE - # if voice == "alloy": - # v = Voices.Alloy - # elif voice == "echo": - # v = Voices.Echo - # elif voice == "shimmer": - # v = Voices.Shimmer - self.config.voice = voice + v = DEFAULT_VOICE + if voice == "alloy": + v = Voices.Alloy + elif voice == "echo": + v = Voices.Echo + elif voice == "shimmer": + v = Voices.Shimmer + self.config.voice = v except Exception as err: logger.info(f"GetProperty optional {PROPERTY_VOICE} error: {err}") diff --git a/demo/src/app/api/agents/start/graph.tsx b/demo/src/app/api/agents/start/graph.tsx index a2f55dc2..e1c68163 100644 --- a/demo/src/app/api/agents/start/graph.tsx +++ b/demo/src/app/api/agents/start/graph.tsx @@ -15,7 +15,7 @@ export const voiceNameMap: LanguageMap = { female: "Zhiyu", }, openai: { - male: "ash", + male: "alloy", female: "shimmer" } }, @@ -33,7 +33,7 @@ export const voiceNameMap: LanguageMap = { female: "Ruth", }, openai: { - male: "ash", + male: "alloy", female: "shimmer" } }, @@ -43,7 +43,7 @@ export const voiceNameMap: LanguageMap = { female: "ja-JP-NanamiNeural", }, openai: { - male: "ash", + male: "alloy", female: "shimmer" } }, @@ -53,7 +53,7 @@ export const voiceNameMap: LanguageMap = { female: "ko-KR-JiMinNeural", }, openai: { - male: "ash", + male: "alloy", female: "shimmer" } }, diff --git a/docker-compose.yml b/docker-compose.yml index c02a8746..5bbdccc6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,65 +1,65 @@ services: - ten_agent_dev: - image: ghcr.io/ten-framework/ten_agent_build:0.2.1 - container_name: ten_agent_dev - platform: linux/amd64 - tty: true - stdin_open: true - restart: always - command: "make run-gd-server" - ports: - - "${GRAPH_DESIGNER_SERVER_PORT}:${GRAPH_DESIGNER_SERVER_PORT}" - - "${SERVER_PORT}:${SERVER_PORT}" - volumes: - - ./:/app - - ${LOG_PATH}:${LOG_PATH} - working_dir: /app - env_file: - - .env - networks: - - ten_agent_network - ten_agent_playground: - image: ghcr.io/ten-framework/ten_agent_playground:0.5.0-67-g3c37e38 - container_name: ten_agent_playground - restart: always - ports: - - "3000:3000" - networks: - - ten_agent_network - environment: - - AGENT_SERVER_URL=http://ten_agent_dev:8080 - - TEN_DEV_SERVER_URL=http://ten_agent_dev:49483 - ten_agent_demo: - image: ghcr.io/ten-framework/ten_agent_demo:0.5.0-87-g261ac1e - container_name: ten_agent_demo - restart: always - ports: - - "3002:3000" - networks: - - ten_agent_network - environment: - - AGENT_SERVER_URL=http://ten_agent_dev:8080 + ten_agent_dev: + image: ghcr.io/ten-framework/ten_agent_build:0.2.1 + container_name: ten_agent_dev + platform: linux/amd64 + tty: true + stdin_open: true + restart: always + command: "make run-gd-server" + ports: + - "${GRAPH_DESIGNER_SERVER_PORT}:${GRAPH_DESIGNER_SERVER_PORT}" + - "${SERVER_PORT}:${SERVER_PORT}" + volumes: + - ./:/app + - ${LOG_PATH}:${LOG_PATH} + working_dir: /app + env_file: + - .env + networks: + - ten_agent_network + ten_agent_playground: + image: ghcr.io/ten-framework/ten_agent_playground:0.5.0-85-gfc7cde3 + container_name: ten_agent_playground + restart: always + ports: + - "3000:3000" + networks: + - ten_agent_network + environment: + - AGENT_SERVER_URL=http://ten_agent_dev:8080 + - TEN_DEV_SERVER_URL=http://ten_agent_dev:49483 + ten_agent_demo: + image: ghcr.io/ten-framework/ten_agent_demo:0.5.0-75-gb45cbd2 + container_name: ten_agent_demo + restart: always + ports: + - "3002:3000" + networks: + - ten_agent_network + environment: + - AGENT_SERVER_URL=http://ten_agent_dev:8080 - # use this when you want to run the playground in local development mode - # ten_agent_playground_dev: - # image: node:20-alpine - # container_name: ten_agent_playground_dev - # restart: always - # command: sh -c "cd /app/playground && npm i && npm run dev" #build && npm run start" - # ports: - # - "3002:3000" - # volumes: - # - ./:/app - ten_graph_designer: - image: ghcr.io/ten-framework/ten_graph_designer:dde0ff1 - container_name: ten_graph_designer - restart: always - ports: - - "3001:3000" - networks: - - ten_agent_network - environment: - - TEN_DEV_SERVER_URL=http://ten_agent_dev:49483 + # use this when you want to run the playground in local development mode + # ten_agent_playground_dev: + # image: node:20-alpine + # container_name: ten_agent_playground_dev + # restart: always + # command: sh -c "cd /app/playground && npm i && npm run dev" #build && npm run start" + # ports: + # - "3002:3000" + # volumes: + # - ./:/app + ten_graph_designer: + image: ghcr.io/ten-framework/ten_graph_designer:dde0ff1 + container_name: ten_graph_designer + restart: always + ports: + - "3001:3000" + networks: + - ten_agent_network + environment: + - TEN_DEV_SERVER_URL=http://ten_agent_dev:49483 networks: ten_agent_network: - driver: bridge + driver: bridge \ No newline at end of file