wenet python wrapper for runtime
note: Because wenet support binding runtime,so archive this repo
if you‘re interesting in ctc decoder and mwer loss etc please see https://github.com/Mddct/ctcdecoder
wenet runtime binding
wenet python wrapper for runtime
note: Because wenet support binding runtime,so archive this repo
if you‘re interesting in ctc decoder and mwer loss etc please see https://github.com/Mddct/ctcdecoder
There is no need to export decoder and accept waveform and ' reset etc to user
1 initial decoder in recognize and streaming_recognize
2 python : streaming recognize return type should be a
generator
Go: streaming recognize return type should be a channel
3 when we want to change the config of current model to do next decoding, model.config[...] = ... should work
Therefore, internal streaming and non streaming depend only on the chunk size
[{"sentence":"甚至出现"}]��=0
pip install wenet
import wenet
model = wenet.from_pretrained("wenetspeech")
# for single infer
wav = 'example.wav'
model.recognize(wav, methods = "ctc_prefix_beam_search")
# for batch infer
wav_list = [example.wav, example.wav]
batch_size = 10
model.recognize_batch(wav_list, batch_size=10, methods = "attention_rescoring")
# with wfst lm
options = wenet.decoder.CtcPrefixBeamSearchOptions(blank = 0, first_beam_size=10, second_beam_size=10)
params = wenet.decoder.Params(ctc_options=options)
model = wenet.from_pretrained("wenetspeech", fst_path="TLG.fst", params=params)
# If options is used, the default decoding method in Options is used
model.recognize(wav)
model.recognize_batch(wav)
# for ctc probs
ctc_probs = model.recognize(wav, methods = "ctc_prefix_beam_search", ctc_prbos=True)
some useful ref:
https://github.com/daanzu/wenet_stt_python
https://cffi.readthedocs.io/en/latest/
http://www.swig.org/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.