fix(tts): migrate legacy edge config in doctor

This commit is contained in:
Peter Steinberger
2026-04-25 05:55:48 +01:00
parent b0e834b2d9
commit e31aef7e19
6 changed files with 124 additions and 28 deletions

View File

@@ -184,27 +184,6 @@ describe("buildMicrosoftSpeechProvider", () => {
vi.restoreAllMocks();
});
it("accepts legacy providers.edge voice config", () => {
const provider = buildMicrosoftSpeechProvider();
const resolved = provider.resolveConfig?.({
cfg: TEST_CFG,
rawConfig: {
provider: "edge",
providers: {
edge: {
voice: "en-US-AvaNeural",
},
},
},
timeoutMs: 1000,
});
expect(resolved).toMatchObject({
voice: "en-US-AvaNeural",
});
});
it("switches to a Chinese voice for CJK text when no explicit voice override is set", async () => {
const provider = buildMicrosoftSpeechProvider();
const edgeSpy = vi.spyOn(ttsModule, "edgeTTS").mockImplementation(async ({ outputPath }) => {