fujimotos commited on
Commit
55332b8
1 Parent(s): 2e20cf3

Update example code to use latest ReazonSpeech API

Browse files

Signed-off-by: Fujimoto Seiji <[email protected]>

Files changed (1) hide show
  1. README.md +8 -12
README.md CHANGED
@@ -26,21 +26,17 @@ The general architecture is the same as [reazonspeech-espnet-v1](https://hugging
26
 
27
  ## Usage
28
 
29
- We provide `transcribe()` function that is suitable to use with this
30
- model.
 
31
 
32
  ```
33
- from espnet2.bin.asr_inference import Speech2Text
34
- from reazonspeech.espnet.asr import transcribe
35
 
36
- speech2text = Speech2Text(
37
- "exp/asr_train_asr_conformer_raw_jp_char/config.yaml",
38
- "exp/asr_train_asr_conformer_raw_jp_char/valid.acc.ave_10best.pth",
39
- device="cuda"
40
- )
41
-
42
- for cap in transcribe("speech.wav", speech2text):
43
- print(cap)
44
  ```
45
 
46
  ## License
 
26
 
27
  ## Usage
28
 
29
+ We recommend to use this model through our
30
+ [reazonspeech](https://github.com/reazon-research/reazonspeech)
31
+ library.
32
 
33
  ```
34
+ from reazonspeech.espnet.asr import load_model, transcribe, audio_from_path
 
35
 
36
+ audio = audio_from_path("speech.wav")
37
+ model = load_model()
38
+ ret = transcribe(model, audio)
39
+ print(ret.text)
 
 
 
 
40
  ```
41
 
42
  ## License