⬅️ Back to Table of Contents
📄 demo.vue
📊 Analysis Summary
Metric |
Count |
🔧 Functions |
3 |
📦 Imports |
4 |
📊 Variables & Constants |
3 |
📚 Table of Contents
🛠️ File Location:
📂 packages/core/useSpeechSynthesis/demo.vue
📦 Imports
Name |
Source |
useSpeechSynthesis |
@vueuse/core |
deepRef |
vue |
onMounted |
vue |
shallowRef |
vue |
Variables & Constants
Name |
Type |
Kind |
Value |
Exported |
voice |
boolean |
let/var |
deepRef<SpeechSynthesisVoice>(undefined as unknown as SpeechSynthesisVoice) |
✗ |
synth |
SpeechSynthesis |
let/var |
*not shown* |
✗ |
voices |
boolean |
let/var |
shallowRef<SpeechSynthesisVoice[]>([]) |
✗ |
Functions
play(): void
Code
function play() {
if (speech.status.value === 'pause') {
console.log('resume')
window.speechSynthesis.resume()
}
else {
speech.speak()
}
}
- Return Type:
void
- Calls:
console.log
window.speechSynthesis.resume
speech.speak
pause(): void
Code
function pause() {
window.speechSynthesis.pause()
}
- Return Type:
void
- Calls:
window.speechSynthesis.pause
stop(): void
Code
function stop() {
speech.stop()
}
- Return Type:
void
- Calls:
speech.stop