mirror of
https://github.com/Tony0410/readlater.git
synced 2026-05-24 22:01:41 +08:00
Fix Edge TTS voice - don't use browser voice settings
Browser voices (like Apple's) aren't compatible with Edge TTS. Always use Edge's default voice (en-US-AvaNeural). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -119,6 +119,7 @@ export function useTTS({ settings, text }: UseTTSOptions): UseTTSReturn {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Use proxy to avoid CORS issues
|
// Use proxy to avoid CORS issues
|
||||||
|
// Don't pass browser voices to Edge TTS - use default
|
||||||
const response = await fetch("/api/tts", {
|
const response = await fetch("/api/tts", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -126,9 +127,8 @@ export function useTTS({ settings, text }: UseTTSOptions): UseTTSReturn {
|
|||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
engine: "edge",
|
engine: "edge",
|
||||||
url: settings.edgeUrl,
|
|
||||||
text: textRef.current,
|
text: textRef.current,
|
||||||
voice: settings.voice || "en-US-AvaNeural",
|
voice: "en-US-AvaNeural", // Always use Edge default voice
|
||||||
speed: settings.speed,
|
speed: settings.speed,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user