Python Package
Install
pip install git+https://github.com/wenet-e2e/wenet.git
Development Install
git clone https://github.com/wenet-e2e/wenet.git
cd wenet
pip install -e .
Command line Usage
wenet --language chinese audio.wav
You can specify the following parameters.
-lor--language: chinese/english are supported now.-mor--model_dir: your own model dir-gor--gpu: the device id of gpu, default value -1 represents for cpu.-tor--show_tokens_info: show the token level information such as timestamp, confidence, etc.--align: force align the input audio and transcript--label: the input label to align--paraformer: use the best Chinese model--device: specify the backend accelerator (cuda/npu/cpu)
Python Programming Usage
import wenet
model = wenet.load_model('chinese')
# or model = wenet.load_model(model_dir='xxx')
result = model.transcribe('audio.wav')
print(result['text'])