Commit Graph

19 Commits

Author SHA1 Message Date
Fangjun Kuang
f1cff83ef9 Add address sanitizer and undefined behavior sanitizer (#951) 2024-05-31 13:17:01 +08:00
Karel Vesely
2e45d327a5 Adding temperature scaling on Joiner logits: (#789)
* Adding temperature scaling on Joiner logits:

- T hard-coded to 2.0
- so far best result NCE 0.122 (still not so high)
    - the BPE scores were rescaled with 0.2 (but then also incorrect words
      get high confidence, visually reasonable histograms are for 0.5 scale)
    - BPE->WORD score merging done by min(.) function
      (tried also prob-product, and also arithmetic, geometric, harmonic mean)

- without temperature scaling (i.e. scale 1.0), the best NCE was 0.032 (here product merging was best)

Results seem consistent with: https://arxiv.org/abs/2110.15222

Everything tuned on a very-small set of 100 sentences with 813 words and 10.2% WER, a Czech model.

I also experimented with blank posteriors mixed into the BPE confidences,
but no NCE improvement found, so not pushing that.

Temperature scling added also to the Greedy search confidences.

* making `temperature_scale` configurable from outside
2024-04-26 09:44:26 +08:00
Fangjun Kuang
6bf2099781 Fix code style issues (#774) 2024-04-16 09:46:15 +08:00
Karel Vesely
38c072dcb2 Track token scores (#571)
* add export of per-token scores (ys, lm, context)

- for best path of the modified-beam-search decoding of transducer

* refactoring JSON export of OnlineRecognitionResult, extending pybind11 API of OnlineRecognitionResult

* export per-token scores also for greedy-search (online-transducer)

- export un-scaled lm_probs (modified-beam search, online-transducer)
- polishing

* fill lm_probs/context_scores only if LM/ContextGraph is present (make Result smaller)
2024-02-29 06:28:45 +08:00
chiiyeh
e7b18a2139 add blank_penalty for online transducer (#548) 2024-01-26 12:12:13 +08:00
HieDean
e6a2d0da3b Replace Clone() with View() (#432)
Co-authored-by: hiedean <hiedean@tju.edu.cn>
2023-11-20 09:20:50 +08:00
HieDean
1a6a41eb2c Judge before UseCachedDecoderOut (#431)
Co-authored-by: hiedean <hiedean@tju.edu.cn>
2023-11-17 12:07:47 +08:00
Fangjun Kuang
a12ebfab22 treat unk as blank (#299) 2023-09-07 15:12:29 +08:00
Fangjun Kuang
aa48b76d4b Fix initial tokens to decoding (#246) 2023-08-09 12:33:47 +08:00
Fangjun Kuang
ad05f52666 Add timestamps for streaming ASR. (#123) 2023-04-19 16:02:37 +08:00
Fangjun Kuang
7f72c13d9a Code refactoring (#74)
* Don't reset model state and feature extractor on endpointing

* support passing decoding_method from commandline

* Add modified_beam_search to Python API

* fix C API example

* Fix style issues
2023-03-03 12:10:59 +08:00
PF Luo
5326d0f81f add modified beam search (#69) 2023-03-01 15:32:54 +08:00
Fangjun Kuang
e0b76655c8 Fix batch decoding for greedy search (#71) 2023-03-01 12:18:20 +08:00
Fangjun Kuang
5a8c3a6d10 Use deep copy in Clone() (#66) 2023-02-26 14:54:01 +08:00
Fangjun Kuang
124384369a Add endpointing (#54) 2023-02-22 15:35:55 +08:00
Fangjun Kuang
ea09d5fbc5 Add Python API (#31) 2023-02-19 19:36:03 +08:00
Fangjun Kuang
8acc059b3f Support batch greedy search decoding (#30) 2023-02-19 15:04:24 +08:00
Fangjun Kuang
ebc3b47fb8 add online-recognizer (#29) 2023-02-19 12:45:38 +08:00
Fangjun Kuang
0f6f58d1d3 Add online transducer decoder (#27) 2023-02-19 10:39:07 +08:00