Compare commits
1 Commits
hush/realt
...
cb/extra-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8e2227a21 |
@@ -250,9 +250,7 @@ class CartesiaTTSService(WordTTSService, WebsocketService):
|
|||||||
# because we are likely still playing out audio and need the
|
# because we are likely still playing out audio and need the
|
||||||
# timestamp to set send context frames.
|
# timestamp to set send context frames.
|
||||||
self._context_id = None
|
self._context_id = None
|
||||||
await self.add_word_timestamps(
|
await self.add_word_timestamps([("TTSStoppedFrame", 0), ("Reset", 0)])
|
||||||
[("TTSStoppedFrame", 0), ("LLMFullResponseEndFrame", 0), ("Reset", 0)]
|
|
||||||
)
|
|
||||||
elif msg["type"] == "timestamps":
|
elif msg["type"] == "timestamps":
|
||||||
await self.add_word_timestamps(
|
await self.add_word_timestamps(
|
||||||
list(zip(msg["word_timestamps"]["words"], msg["word_timestamps"]["start"]))
|
list(zip(msg["word_timestamps"]["words"], msg["word_timestamps"]["start"]))
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ class ElevenLabsTTSService(WordTTSService, WebsocketService):
|
|||||||
if isinstance(frame, (TTSStoppedFrame, StartInterruptionFrame)):
|
if isinstance(frame, (TTSStoppedFrame, StartInterruptionFrame)):
|
||||||
self._started = False
|
self._started = False
|
||||||
if isinstance(frame, TTSStoppedFrame):
|
if isinstance(frame, TTSStoppedFrame):
|
||||||
await self.add_word_timestamps([("LLMFullResponseEndFrame", 0), ("Reset", 0)])
|
await self.add_word_timestamps([("Reset", 0)])
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame, direction: FrameDirection):
|
async def process_frame(self, frame: Frame, direction: FrameDirection):
|
||||||
await super().process_frame(frame, direction)
|
await super().process_frame(frame, direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user