MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / stopAllTTS

Function stopAllTTS

packages/ui/src/views/chatmessage/ChatMessage.jsx:1749–1769  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1747 }
1748
1749 const stopAllTTS = () => {
1750 Object.keys(ttsAudio).forEach((messageId) => {
1751 if (ttsAudio[messageId]) {
1752 ttsAudio[messageId].pause()
1753 ttsAudio[messageId].currentTime = 0
1754 }
1755 })
1756 setTtsAudio({})
1757
1758 if (ttsStreamingState.abortController) {
1759 ttsStreamingState.abortController.abort()
1760 }
1761
1762 if (ttsStreamingState.audio) {
1763 ttsStreamingState.audio.pause()
1764 cleanupTTSStreaming()
1765 }
1766
1767 setIsTTSPlaying({})
1768 setIsTTSLoading({})
1769 }
1770
1771 const handleTTSClick = async (messageId, messageText) => {
1772 if (isTTSLoading[messageId]) return

Callers 3

handleAbortFunction · 0.85
handleTTSClickFunction · 0.85
handleTTSStartFunction · 0.85

Calls 2

cleanupTTSStreamingFunction · 0.85
abortMethod · 0.80

Tested by

no test coverage detected