Skip to content

Commit

Permalink
fix: Male voices and accents in OpenAI V2V (#393)
Browse files Browse the repository at this point in the history
* fix: Male voices and accents in OpenAI V2V

* docker image update
  • Loading branch information
plutoless committed Nov 11, 2024
1 parent 03a54ef commit 744e312
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions agents/ten_packages/extension/openai_v2v_python/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down
8 changes: 4 additions & 4 deletions demo/src/app/api/agents/start/graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const voiceNameMap: LanguageMap = {
female: "Zhiyu",
},
openai: {
male: "alloy",
male: "ash",
female: "shimmer"
}
},
Expand All @@ -33,7 +33,7 @@ export const voiceNameMap: LanguageMap = {
female: "Ruth",
},
openai: {
male: "alloy",
male: "ash",
female: "shimmer"
}
},
Expand All @@ -43,7 +43,7 @@ export const voiceNameMap: LanguageMap = {
female: "ja-JP-NanamiNeural",
},
openai: {
male: "alloy",
male: "ash",
female: "shimmer"
}
},
Expand All @@ -53,7 +53,7 @@ export const voiceNameMap: LanguageMap = {
female: "ko-KR-JiMinNeural",
},
openai: {
male: "alloy",
male: "ash",
female: "shimmer"
}
},
Expand Down

0 comments on commit 744e312

Please sign in to comment.