fix: audio ducking
All checks were successful
TrafficCue CI / check (push) Successful in 1m42s
TrafficCue CI / build (push) Successful in 10m19s
TrafficCue CI / build-android (push) Successful in 25m50s

This commit is contained in:
2025-10-21 17:47:06 +02:00
parent 372b31876d
commit 5ec74129e2
5 changed files with 389 additions and 417 deletions

View File

@@ -30,7 +30,8 @@ export default async function say(text: string, language?: Locale) {
await initTTS();
// return;
}
duck();
await duck();
await new Promise((resolve) => setTimeout(resolve, 500)); // wait a bit for ducking to take effect
if (tts !== "web") {
try {
await invoke("plugin:tts|speak", {
@@ -48,5 +49,5 @@ export default async function say(text: string, language?: Locale) {
utterance.lang = m["language.speechSynthesis"]();
window.speechSynthesis.speak(utterance);
}
unduck();
await unduck();
}