wyoming-microsoft-stt 1.3.4__py3-none-any.whl → 1.3.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wyoming_microsoft_stt/__main__.py +1 -0
- wyoming_microsoft_stt/microsoft_stt.py +7 -2
- wyoming_microsoft_stt/version.py +1 -1
- {wyoming_microsoft_stt-1.3.4.dist-info → wyoming_microsoft_stt-1.3.5.dist-info}/METADATA +2 -2
- {wyoming_microsoft_stt-1.3.4.dist-info → wyoming_microsoft_stt-1.3.5.dist-info}/RECORD +7 -7
- {wyoming_microsoft_stt-1.3.4.dist-info → wyoming_microsoft_stt-1.3.5.dist-info}/WHEEL +0 -0
- {wyoming_microsoft_stt-1.3.4.dist-info → wyoming_microsoft_stt-1.3.5.dist-info}/top_level.txt +0 -0
|
@@ -17,7 +17,7 @@ class MicrosoftSTT:
|
|
|
17
17
|
|
|
18
18
|
self._stream: speechsdk.audio.PushAudioInputStream | None = None
|
|
19
19
|
self._speech_recognizer: speechsdk.SpeechRecognizer | None = None
|
|
20
|
-
self._results:
|
|
20
|
+
self._results: speechsdk.SpeechRecognitionResult | None = None
|
|
21
21
|
|
|
22
22
|
try:
|
|
23
23
|
# Initialize the speech configuration with the provided subscription key and region
|
|
@@ -90,6 +90,7 @@ class MicrosoftSTT:
|
|
|
90
90
|
|
|
91
91
|
def push_audio_chunk(self, chunk: bytes) -> None:
|
|
92
92
|
"""Push an audio chunk to the recognizer."""
|
|
93
|
+
_LOGGER.debug(f"Pushing audio chunk of size {len(chunk)} bytes...")
|
|
93
94
|
self._stream.write(chunk)
|
|
94
95
|
|
|
95
96
|
def stop_audio_chunk(self) -> None:
|
|
@@ -108,13 +109,17 @@ class MicrosoftSTT:
|
|
|
108
109
|
|
|
109
110
|
self._speech_recognizer.stop_continuous_recognition()
|
|
110
111
|
|
|
112
|
+
if self._results is None:
|
|
113
|
+
_LOGGER.debug("No results from transcription.")
|
|
114
|
+
return ""
|
|
115
|
+
|
|
111
116
|
return self._results.text
|
|
112
117
|
|
|
113
118
|
except Exception as e:
|
|
114
119
|
_LOGGER.error(f"Failed to transcribe audio: {e}")
|
|
115
120
|
return ""
|
|
116
121
|
|
|
117
|
-
def get_language(self, language: str) -> dict:
|
|
122
|
+
def get_language(self, language: None | str) -> dict:
|
|
118
123
|
"""Get the language code."""
|
|
119
124
|
if len(self.args.language) > 1:
|
|
120
125
|
auto_detect_source_language_config = (
|
wyoming_microsoft_stt/version.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wyoming-microsoft-stt
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.5
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Home-page: https://github.com/hugobloem/wyoming-microsoft-stt
|
|
6
6
|
Author: Hugo Bloem
|
|
7
7
|
Author-email:
|
|
8
8
|
Requires-Python: >=3.13
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
|
-
Requires-Dist: azure-cognitiveservices-speech>=1.
|
|
10
|
+
Requires-Dist: azure-cognitiveservices-speech>=1.46.0
|
|
11
11
|
Requires-Dist: pydantic>=2.11.7
|
|
12
12
|
Requires-Dist: wyoming>=1.7.2
|
|
13
13
|
Dynamic: author
|
|
@@ -4,13 +4,13 @@ tests/test_microsoft_stt.py,sha256=CO6xyLHFcE1kqJ_XuGprRu0i28zTN2oHaKtomK_aJIU,5
|
|
|
4
4
|
tests/test_multilanguage.py,sha256=wRtyWuhWBmA5Yf01JNbmgxqoVKmDcE6XHz9QcfSR700,3100
|
|
5
5
|
tests/test_transcribe.py,sha256=qRxpUO94YQSSdlurupCec4D1KNxHrdb9jb_YkITDf-U,3672
|
|
6
6
|
wyoming_microsoft_stt/__init__.py,sha256=92Kms90cxU6Zs5XjNZiYvIGLA3Yd-BizN-G8f7n506I,3365
|
|
7
|
-
wyoming_microsoft_stt/__main__.py,sha256=
|
|
7
|
+
wyoming_microsoft_stt/__main__.py,sha256=QJq8VuIdr1bz9v3kYPnUF6gQqcyh7EJYrJWeMzJ7QJE,5588
|
|
8
8
|
wyoming_microsoft_stt/download.py,sha256=mTWZl9kVaE7KGeO2d0SS7wztDN6tGo9AudXWhN8uKhg,3379
|
|
9
9
|
wyoming_microsoft_stt/handler.py,sha256=dWm9etFANRU33IDU-p85enHmWtMtTtW522I3AJbTAxg,3330
|
|
10
10
|
wyoming_microsoft_stt/languages.json,sha256=eDZuPJLzDjdZlh0I4081OTkLPt6nZdUY8ra45c7oMCc,1881
|
|
11
|
-
wyoming_microsoft_stt/microsoft_stt.py,sha256=
|
|
12
|
-
wyoming_microsoft_stt/version.py,sha256=
|
|
13
|
-
wyoming_microsoft_stt-1.3.
|
|
14
|
-
wyoming_microsoft_stt-1.3.
|
|
15
|
-
wyoming_microsoft_stt-1.3.
|
|
16
|
-
wyoming_microsoft_stt-1.3.
|
|
11
|
+
wyoming_microsoft_stt/microsoft_stt.py,sha256=NmhA42y1WWnK4ubbHOnL3QYfB6N4labF_xkB2C3ZJPM,5572
|
|
12
|
+
wyoming_microsoft_stt/version.py,sha256=gts4Ey8VuhlTJIs3BIfbiqe_Ow6m1nRUoVq7-gI9q6A,50
|
|
13
|
+
wyoming_microsoft_stt-1.3.5.dist-info/METADATA,sha256=WH3QVMOcN_S-0ZRFmLLRq2FqtaRvVxJU-Giao5pdGQ0,5792
|
|
14
|
+
wyoming_microsoft_stt-1.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
wyoming_microsoft_stt-1.3.5.dist-info/top_level.txt,sha256=aURyYXybYBAybkVTs2RFT5ctnPz5pRa_B7Gn9_SKhL8,28
|
|
16
|
+
wyoming_microsoft_stt-1.3.5.dist-info/RECORD,,
|
|
File without changes
|
{wyoming_microsoft_stt-1.3.4.dist-info → wyoming_microsoft_stt-1.3.5.dist-info}/top_level.txt
RENAMED
|
File without changes
|