Commit f9f21c6
Streaming ASR interfaces (#2377)
* Implemented high level streaming interfaces
More WIP
Bunch of filter properties impl
More WIP interfaces stuff
Fix type annotation in filter_analysis
more wip interfaces
wip
Fix wrong context var set
wip thoughts
Implement file transcription
* Renames and fixes
* Add transcribe_file_streaming
* Formatting fixes
* Revert accidentally introduced change to max_batch_len
* Reworking interface naming and docstring
* Use the searcher directly, forwarding extra args
* More docstrings
* Fix parameter order
* Add WIP StreamingTransducerASR example
* Formatting
* More docstrings and renames for interfaces
* Docstrings for context
* Merge the unnecessary wrapper
* Rename StreamingTransducerASR to StreamingASR
* Fix precommit
* Remove unused fea_extractor field
* Fix test error by commenting out inference stuff
* Add some docstrings to streamingfeaturewrapper
* More docs
* Formatting
* Feature extraction streaming wrapper docstrings
* Add missing file docstring for filter_analysis
* Tentative fix for docs gen error
* Fix some missing docstring args in ASR
* Allow using ffmpeg streaming with StreamingASR
* Extract stream logic into _get_audio_stream
* Docstring for _get_audio_stream
* Formatting
* Move out some streaming tokenizer logic
* Accept stupid suggestions from formatter
* Somewhat more generic StreamingASR
* Tokenizer-agnostic StreamingASR
* Add commented out tokenizer streaming hparams
* Add missing docstring
* Remove unused import from ASR
* CI and configuration fixes; use python 3.9 in CI
* Fix doctest using inconsistent left context size
* Clarify on tokenizer_context init
* Update HPARAMS_NEEDED for StreamingASR
* Improve transducer forward docs for extra args
* Fix code blocks in filter_analysis
* Linting
* fix broken indent in filter_analysis examples...
* Update author lists
* Remove currently unused has_overlap
* Clarify on fea_streaming_extractor properties
* Fix ASRStreamingContext doc wording
* Improve docstring for `get_chunk_size_frames`
* wip test
* Streaming feature wrapper test + better docs
* Improve StreamingFeatureWraper docstring
* Improve docstring and comments on spm streaming decode
* Fixed accidentally duplicated docstring
* Fix very stupid typo
* Add notice for trained streaming ASR inference
* Use LengthsCapableSequential instead of custom wrapper
* Precommit fix
* Added mechanism to inject zero chunks at the end to fix trunc
* Simplify apply in YAML
* Add decoding_function abstraction for StreamingASR
* Fix partial apply shenanigans
---------
Co-authored-by: Mirco Ravanelli <mirco.ravanelli@gmail.com>1 parent f9b5473 commit f9f21c6
18 files changed
Lines changed: 1081 additions & 31 deletions
File tree
- .github/workflows
- docs
- recipes/LibriSpeech/ASR/transducer
- hparams
- speechbrain
- decoders
- inference
- lobes
- models
- transformer
- processing
- tokenizers
- utils
- tests/unittests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | 100 | | |
115 | 101 | | |
116 | 102 | | |
| |||
122 | 108 | | |
123 | 109 | | |
124 | 110 | | |
| 111 | + | |
125 | 112 | | |
126 | 113 | | |
127 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
67 | 79 | | |
68 | 80 | | |
69 | 81 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
9 | 21 | | |
10 | 22 | | |
11 | 23 | | |
| |||
255 | 267 | | |
256 | 268 | | |
257 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
258 | 293 | | |
259 | 294 | | |
260 | 295 | | |
| |||
0 commit comments