feat(speech): switch mentor TTS voice to female diana
Code-only commit; production deployment handled separately.
This commit is contained in:
+2
-2
@@ -36,12 +36,12 @@ public class AihrSpeechService {
|
||||
private static final String DEFAULT_TTS_VOICE = "anna";
|
||||
private static final Pattern SAFE_VOICE = Pattern.compile("[A-Za-z0-9_./:-]{1,200}");
|
||||
private static final Map<String, String> ROLE_VOICES = Map.of(
|
||||
"mentor", "benjamin",
|
||||
"mentor", "diana",
|
||||
"customer", "bella",
|
||||
"interviewer", "alex"
|
||||
);
|
||||
private static final Map<String, String> EMOTION_PROMPTS = Map.of(
|
||||
"warm", "请用沉稳、耐心、有经验的老师傅语气说",
|
||||
"warm", "请用温和、耐心、有经验的师傅语气说",
|
||||
"professional", "请用沉稳、专业、清晰的语气说",
|
||||
"serious", "请用严肃、克制、带明显质疑的语气说",
|
||||
"intense", "请用情绪强烈、急切、有压力且明显不满的语气说",
|
||||
|
||||
+2
-2
@@ -32,9 +32,9 @@ class AihrSpeechServiceTest {
|
||||
var legacy = AihrSpeechService.buildRequestBody(
|
||||
mapper, runtime, "普通播报", "alex", null);
|
||||
|
||||
assertEquals("FunAudioLLM/CosyVoice2-0.5B:benjamin", mentor.path("voice").asText());
|
||||
assertEquals("FunAudioLLM/CosyVoice2-0.5B:diana", mentor.path("voice").asText());
|
||||
assertEquals(0.92, mentor.path("speed").asDouble());
|
||||
assertTrue(mentor.path("input").asText().contains("老师傅语气"));
|
||||
assertTrue(mentor.path("input").asText().contains("师傅语气"));
|
||||
assertEquals("FunAudioLLM/CosyVoice2-0.5B:bella", customer.path("voice").asText());
|
||||
assertEquals(1.3, customer.path("speed").asDouble());
|
||||
assertTrue(customer.path("input").asText().contains("情绪强烈"));
|
||||
|
||||
Reference in New Issue
Block a user