added the text showing when anouncent and fixed that sv-poup is used but not in package.json
This commit is contained in:
parent
f95327b8fc
commit
a04c2a4faa
4 changed files with 35 additions and 22 deletions
|
@ -1,7 +1,14 @@
|
|||
import { PlayingAnnouncement } from "./announcerData.svelte.js";
|
||||
|
||||
export function AnnounceUsingTTS(text) {
|
||||
window.speechSynthesis.speak(
|
||||
Object.assign(new SpeechSynthesisUtterance(text), {
|
||||
rate: 0.5,
|
||||
}),
|
||||
);
|
||||
}
|
||||
PlayingAnnouncement.v = true;
|
||||
|
||||
const utterance = new SpeechSynthesisUtterance(text);
|
||||
utterance.rate = 0.5;
|
||||
utterance.onend = () => {
|
||||
PlayingAnnouncement.v = false;
|
||||
};
|
||||
window.speechSynthesis.speak(utterance);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
export let CurrentText = $state({ v: "" });
|
||||
export let MostUsedAnnouncements = $state({ v: [] });
|
||||
export let MostUsedAnnouncements = $state({ v: [] });
|
||||
export let PlayingAnnouncement = $state({ v: false });
|
Loading…
Add table
Add a link
Reference in a new issue