forked from wenet-e2e/wenet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cli] support model dir, add related docs (wenet-e2e#2087)
* [cli] support model dir, add related docs * fix lint
- Loading branch information
Showing
5 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Python Package | ||
|
||
|
||
## Install | ||
|
||
``` sh | ||
pip install git+https://github.com/wenet-e2e/wenet.git | ||
``` | ||
|
||
## Command line Usage | ||
|
||
``` sh | ||
wenet --language chinese audio.wav | ||
``` | ||
|
||
You can specify the following parameters. | ||
|
||
* `-l` or `--language`: chinese/english are supported now. | ||
* `-m` or `--model_dir`: your own model dir | ||
* `-t` or `--show_tokens_info`: show the token level information such as timestamp, confidence, etc. | ||
|
||
|
||
## Python Programming Usage | ||
|
||
``` python | ||
import wenet | ||
|
||
model = wenet.load_model('chinese') | ||
# or model = wenet.load_model(model_dir='xxx') | ||
result = model.transcribe('audio.wav') | ||
print(result['text']) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters