Speech recognition is an advanced tool that can automatically convert human-spoken multiple languages into corresponding texts. This technology also plays an important role in various fields such as intelligent customer service, voice assistants, and meeting minutes. Multilingual speech recognition can support automatic language retrieval and recognize speech in multiple different languages.
| Demo Link | Training Data | Size | Descriptions | CER | Model |
|---|---|---|---|---|---|
| Whisper | 680kh from internet | large: 5.8G, | medium: 2.9G,
Before quick integration, you need to install the PaddleX wheel package. For the installation method, please refer to the PaddleX Local Installation Tutorial. After installing the wheel package, a few lines of code can complete the inference of the text recognition module. You can switch models under this module freely, and you can also integrate the model inference of the text recognition module into your project.
Before running the following code, please download the demo audio to your local machine.
from paddlex import create_model
model = create_model("whisper_large")
output = model.predict("./zh.wav", batch_size=1)
for res in output:
res.print(json_format=False)
For more information on using PaddleX's single-model inference APIs, please refer to the PaddleX Single-Model Python Script Usage Instructions.
Currently, this model only supports inference.
You can use the following commands to download the Demo dataset to a specified folder:
wget https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
Not support for now.
Not support for now.
To perform inference prediction via the command line, simply use the following command:
Before running the following code, please download the demo audio to your local machine.
python main.py -c paddlex/configs/modules/multilingual_speech_recognition/whisper_large.yaml \
-o Global.mode=predict \
-o Predict.input="./zh.wav"
the following steps are required for model inference:
.yaml configuration file path for the model (here it is whisper_large.yaml)-o Global.mode=predict-o Predict.input="..."
Other related parameters can be set by modifying the Global and Predict fields in the .yaml configuration file. For details, refer to PaddleX Common Model Configuration File Parameter Description.Models can be directly integrated into the PaddleX pipelines or into your own projects.
1.Pipeline Integration
No example for now.
2.Module Integration
The weights you produce can be directly integrated into the text recognition module. Refer to the Quick Integration Python example code. Simply replace the model with the path to your trained model.