ASR Decoder
Project description
asr-decoder
CTC decoder with hotwords for ASR models. Supports ctc_greedy_search
and ctc_prefix_bream_search
decoding methods.
Usage
- ctc greedy search
from asr_decoder import CTCDecoder
decoder = CTCDecoder()
# ctc_probs: (sequence_length, vocab_size)
result = decoder.ctc_greedy_search(ctc_probs, is_last=True)
- ctc prefix beam search (with hotwords)
from asr_decoder import CTCDecoder
hotwords = ["停止"]
decoder = CTCDecoder(hotwords, symbol_table, bpemodel)
# ctc_probs: (sequence_length, vocab_size)
result = decoder.ctc_prefix_beam_search(ctc_probs, beam_size=3, is_last=True)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
asr-decoder-0.0.6.tar.gz
(10.9 kB
view details)
File details
Details for the file asr-decoder-0.0.6.tar.gz
.
File metadata
- Download URL: asr-decoder-0.0.6.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d295d482bfff6ea2e445dac76630973922e155c640bf43f0bc312674a6a0aca |
|
MD5 | c2c67e5605993fdb3072c66457eaa14f |
|
BLAKE2b-256 | eef4617295edda3f4aea9ec71fc394eaa502a79ef0748cb862f37d0465755d70 |