From 744e312b3ded506475d0dcbd5faefb9abab3123c Mon Sep 17 00:00:00 2001 From: Ethan Zhang Date: Mon, 11 Nov 2024 03:09:38 +0800 Subject: [PATCH] fix: Male voices and accents in OpenAI V2V (#393) * fix: Male voices and accents in OpenAI V2V * docker image update --- .../extension/openai_v2v_python/extension.py | 16 ++++++++-------- demo/src/app/api/agents/start/graph.tsx | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/agents/ten_packages/extension/openai_v2v_python/extension.py b/agents/ten_packages/extension/openai_v2v_python/extension.py index 3ae55d71..5c39968e 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 = v + # 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 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 e1c68163..a2f55dc2 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: "alloy", + male: "ash", female: "shimmer" } }, @@ -33,7 +33,7 @@ export const voiceNameMap: LanguageMap = { female: "Ruth", }, openai: { - male: "alloy", + male: "ash", female: "shimmer" } }, @@ -43,7 +43,7 @@ export const voiceNameMap: LanguageMap = { female: "ja-JP-NanamiNeural", }, openai: { - male: "alloy", + male: "ash", female: "shimmer" } }, @@ -53,7 +53,7 @@ export const voiceNameMap: LanguageMap = { female: "ko-KR-JiMinNeural", }, openai: { - male: "alloy", + male: "ash", female: "shimmer" } },