Update example code to use latest ReazonSpeech API
Browse filesSigned-off-by: Fujimoto Seiji <[email protected]>
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
|
30 |
-
|
|
|
31 |
|
32 |
```
|
33 |
-
from
|
34 |
-
from reazonspeech.espnet.asr import transcribe
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
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
|