Commit 264807d
fix: robustify the STT streaming results handling (#768)
* fix: robustify the STT streaming results handling
In the STT recognize_listener, the clause that handles 'results' or 'speaker_labels'
was prone to index errors when the 'results' object returned by the service was
empty. This can happen, so this change makes that logic safe to empty (or otherwise
malformed) results.
* Remove buggy extra call to on_hypothesis
Co-authored-by: Mamoon Raja <mamoonraja1@gmail.com>
Co-authored-by: Angelo Paparazzi <angelo.paparazzi@ibm.com>1 parent a23a745 commit 264807d
1 file changed
+15
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
| |||
0 commit comments