We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8708e4 commit f39f2a8Copy full SHA for f39f2a8
wyoming_whisper_api_client/handler.py
@@ -3,6 +3,7 @@
3
import httpx
4
import logging
5
import wave
6
+import re
7
8
from io import BytesIO
9
@@ -67,6 +68,9 @@ async def handle_event(self, event: Event) -> bool:
67
68
#_LOGGER.debug(r.json())
69
text = r.json()['text']
70
71
+ text = re.sub(r'\[.*?\]', '', text).strip()
72
+ text = re.sub(r'\(.*?\)', '', text).strip()
73
+
74
_LOGGER.info(text)
75
76
await self.write_event(Transcript(text=text).event())
0 commit comments