feat: integrate JV Voice Profile cloning, Voicebox research, and ensure session voice/markdown prompt nudge
This commit is contained in:
+33
-2
@@ -19,6 +19,7 @@ KOKORO_VOICES = {
|
||||
"af_sarah": "American Female - Soft & Smooth",
|
||||
"af_nicole": "American Female - Relaxed",
|
||||
"af_sky": "American Female - Bright",
|
||||
"af_alba": "American Female - Pocket Alba",
|
||||
"am_michael": "American Male - Friendly & Crisp",
|
||||
"am_adam": "American Male - Natural",
|
||||
"am_fenrir": "American Male - Deep",
|
||||
@@ -27,6 +28,9 @@ KOKORO_VOICES = {
|
||||
"bf_isabella": "British Female - Smooth",
|
||||
"bm_george": "British Male - Warm",
|
||||
"bm_fable": "British Male - Expressive",
|
||||
"bm_stuart": "British Male - Stuart Bell",
|
||||
"custom_pocket": "Pocket Voice Clone (Default)",
|
||||
"jv_pocket": "JV Voice Profile (Cloned via Voicebox sample)",
|
||||
}
|
||||
|
||||
MACOS_VOICES = {
|
||||
@@ -35,6 +39,7 @@ MACOS_VOICES = {
|
||||
"Samantha": "US Female",
|
||||
"Karen": "Australian Female",
|
||||
"Alex": "US Male",
|
||||
"Stuart": "UK Male",
|
||||
}
|
||||
|
||||
VOICE_ALIASES = {
|
||||
@@ -48,6 +53,24 @@ VOICE_ALIASES = {
|
||||
"heart": "af_heart",
|
||||
"fenrir": "am_fenrir",
|
||||
"adam": "am_adam",
|
||||
"alba": "af_alba",
|
||||
"pocket alba": "af_alba",
|
||||
"pocketalba": "af_alba",
|
||||
"pocket_alba": "af_alba",
|
||||
"stuart": "bm_george",
|
||||
"stuart bell": "bm_george",
|
||||
"stuartbell": "bm_george",
|
||||
"stuart_bell": "bm_george",
|
||||
"bell": "bm_george",
|
||||
"custom_pocket": "custom_pocket",
|
||||
"pocket_custom": "custom_pocket",
|
||||
"pocket custom": "custom_pocket",
|
||||
"custom voice": "custom_pocket",
|
||||
"jv": "jv_pocket",
|
||||
"jv_pocket": "jv_pocket",
|
||||
"jv pocket": "jv_pocket",
|
||||
"jv profile": "jv_pocket",
|
||||
"jv voice": "jv_pocket",
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +154,7 @@ class VoiceManager:
|
||||
break
|
||||
|
||||
if not matched_voice:
|
||||
# Partial/substring match search
|
||||
# Partial/substring match search in Kokoro voices
|
||||
for v in KOKORO_VOICES:
|
||||
v_norm = re.sub(r"[^a-z0-9]", "", v.lower())
|
||||
if norm_name in v_norm or v_norm in norm_name:
|
||||
@@ -139,7 +162,15 @@ class VoiceManager:
|
||||
break
|
||||
|
||||
if not matched_voice:
|
||||
available = ", ".join(list(KOKORO_VOICES.keys()))
|
||||
# Match in macOS voices
|
||||
for v in MACOS_VOICES:
|
||||
v_norm = re.sub(r"[^a-z0-9]", "", v.lower())
|
||||
if norm_name == v_norm or clean_name == v.lower() or norm_name in v_norm or v_norm in norm_name:
|
||||
matched_voice = v
|
||||
break
|
||||
|
||||
if not matched_voice:
|
||||
available = ", ".join(list(KOKORO_VOICES.keys()) + list(MACOS_VOICES.keys()))
|
||||
return False, f"Voice '{voice_name}' not found. Available voices: {available}"
|
||||
|
||||
self._active_voice = matched_voice
|
||||
|
||||
Reference in New Issue
Block a user