提交 49dadc80 编写于 作者: K KP

Update usage and doc of cli executor.

上级 7bc54cbb
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
import numpy as np import numpy as np
from logs import LOGGER from logs import LOGGER
from paddlespeech.cli import VectorExecutor from paddlespeech.cli.vector import VectorExecutor
vector_executor = VectorExecutor() vector_executor = VectorExecutor()
......
...@@ -57,7 +57,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/cat.wav https://paddlespe ...@@ -57,7 +57,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/cat.wav https://paddlespe
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import CLSExecutor from paddlespeech.cli.cls import CLSExecutor
cls_executor = CLSExecutor() cls_executor = CLSExecutor()
result = cls_executor( result = cls_executor(
......
...@@ -57,7 +57,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/cat.wav https://paddlespe ...@@ -57,7 +57,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/cat.wav https://paddlespe
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import CLSExecutor from paddlespeech.cli.cls import CLSExecutor
cls_executor = CLSExecutor() cls_executor = CLSExecutor()
result = cls_executor( result = cls_executor(
......
...@@ -28,7 +28,8 @@ ffmpeg -i subtitle_demo1.mp4 -ac 1 -ar 16000 -vn input.wav ...@@ -28,7 +28,8 @@ ffmpeg -i subtitle_demo1.mp4 -ac 1 -ar 16000 -vn input.wav
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import ASRExecutor, TextExecutor from paddlespeech.cli.asr import ASRExecutor
from paddlespeech.cli.text import TextExecutor
asr_executor = ASRExecutor() asr_executor = ASRExecutor()
text_executor = TextExecutor() text_executor = TextExecutor()
......
...@@ -23,7 +23,8 @@ ffmpeg -i subtitle_demo1.mp4 -ac 1 -ar 16000 -vn input.wav ...@@ -23,7 +23,8 @@ ffmpeg -i subtitle_demo1.mp4 -ac 1 -ar 16000 -vn input.wav
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import ASRExecutor, TextExecutor from paddlespeech.cli.asr import ASRExecutor
from paddlespeech.cli.text import TextExecutor
asr_executor = ASRExecutor() asr_executor = ASRExecutor()
text_executor = TextExecutor() text_executor = TextExecutor()
......
...@@ -16,8 +16,8 @@ import os ...@@ -16,8 +16,8 @@ import os
import paddle import paddle
from paddlespeech.cli import ASRExecutor from paddlespeech.cli.asr import ASRExecutor
from paddlespeech.cli import TextExecutor from paddlespeech.cli.text import TextExecutor
# yapf: disable # yapf: disable
parser = argparse.ArgumentParser(__doc__) parser = argparse.ArgumentParser(__doc__)
......
...@@ -42,7 +42,7 @@ The input of this demo should be a text of the specific language that can be pas ...@@ -42,7 +42,7 @@ The input of this demo should be a text of the specific language that can be pas
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import TextExecutor from paddlespeech.cli.text import TextExecutor
text_executor = TextExecutor() text_executor = TextExecutor()
result = text_executor( result = text_executor(
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import TextExecutor from paddlespeech.cli.text import TextExecutor
text_executor = TextExecutor() text_executor = TextExecutor()
result = text_executor( result = text_executor(
......
...@@ -96,7 +96,7 @@ wget -c https://paddlespeech.bj.bcebos.com/vector/audio/85236145389.wav ...@@ -96,7 +96,7 @@ wget -c https://paddlespeech.bj.bcebos.com/vector/audio/85236145389.wav
- Python API - Python API
```python ```python
from paddlespeech.cli import VectorExecutor from paddlespeech.cli.vector import VectorExecutor
vector_executor = VectorExecutor() vector_executor = VectorExecutor()
audio_emb = vector_executor( audio_emb = vector_executor(
......
...@@ -95,7 +95,7 @@ wget -c https://paddlespeech.bj.bcebos.com/vector/audio/85236145389.wav ...@@ -95,7 +95,7 @@ wget -c https://paddlespeech.bj.bcebos.com/vector/audio/85236145389.wav
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import VectorExecutor from paddlespeech.cli.vector import VectorExecutor
vector_executor = VectorExecutor() vector_executor = VectorExecutor()
audio_emb = vector_executor( audio_emb = vector_executor(
......
...@@ -58,7 +58,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee ...@@ -58,7 +58,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import ASRExecutor from paddlespeech.cli.asr import ASRExecutor
asr_executor = ASRExecutor() asr_executor = ASRExecutor()
text = asr_executor( text = asr_executor(
......
...@@ -56,7 +56,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee ...@@ -56,7 +56,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import ASRExecutor from paddlespeech.cli.asr import ASRExecutor
asr_executor = ASRExecutor() asr_executor = ASRExecutor()
text = asr_executor( text = asr_executor(
......
...@@ -47,7 +47,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee ...@@ -47,7 +47,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import STExecutor from paddlespeech.cli.st import STExecutor
st_executor = STExecutor() st_executor = STExecutor()
text = st_executor( text = st_executor(
......
...@@ -47,7 +47,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee ...@@ -47,7 +47,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import STExecutor from paddlespeech.cli.st import STExecutor
st_executor = STExecutor() st_executor = STExecutor()
text = st_executor( text = st_executor(
......
...@@ -77,7 +77,7 @@ The input of this demo should be a text of the specific language that can be pas ...@@ -77,7 +77,7 @@ The input of this demo should be a text of the specific language that can be pas
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import TTSExecutor from paddlespeech.cli.tts import TTSExecutor
tts_executor = TTSExecutor() tts_executor = TTSExecutor()
wav_file = tts_executor( wav_file = tts_executor(
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
- Python API - Python API
```python ```python
import paddle import paddle
from paddlespeech.cli import TTSExecutor from paddlespeech.cli.tts import TTSExecutor
tts_executor = TTSExecutor() tts_executor = TTSExecutor()
wav_file = tts_executor( wav_file = tts_executor(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册