2024-04-24 18:41:48 +08:00
|
|
|
# Introduction
|
2023-04-20 09:10:47 +08:00
|
|
|
|
2024-04-24 18:41:48 +08:00
|
|
|
This directory contains examples for the JAVA API of sherpa-onnx.
|
2023-04-20 09:10:47 +08:00
|
|
|
|
2024-04-24 18:41:48 +08:00
|
|
|
# Usage
|
2023-04-20 09:10:47 +08:00
|
|
|
|
2024-10-11 16:51:40 +08:00
|
|
|
## Non-streaming speaker diarization
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-offline-speaker-diarization.sh
|
|
|
|
|
```
|
|
|
|
|
|
2024-04-24 21:03:26 +08:00
|
|
|
## Streaming Speech recognition
|
|
|
|
|
|
2023-04-15 22:17:28 +08:00
|
|
|
```
|
2024-06-23 19:43:53 +08:00
|
|
|
./run-streaming-asr-from-mic-transducer.sh
|
2024-04-24 18:41:48 +08:00
|
|
|
./run-streaming-decode-file-ctc.sh
|
2024-04-25 17:20:02 +08:00
|
|
|
./run-streaming-decode-file-ctc-hlg.sh
|
2024-04-24 18:41:48 +08:00
|
|
|
./run-streaming-decode-file-paraformer.sh
|
|
|
|
|
./run-streaming-decode-file-transducer.sh
|
2023-04-20 09:10:47 +08:00
|
|
|
```
|
2024-04-24 21:03:26 +08:00
|
|
|
|
|
|
|
|
## Non-Streaming Speech recognition
|
|
|
|
|
|
|
|
|
|
```bash
|
2025-04-02 21:16:14 +08:00
|
|
|
./run-non-streaming-decode-file-dolphin-ctc.sh
|
2025-07-08 13:45:26 +08:00
|
|
|
./run-non-streaming-decode-file-fire-red-asr.sh
|
|
|
|
|
./run-non-streaming-decode-file-moonshine.sh
|
|
|
|
|
./run-non-streaming-decode-file-nemo-canary.sh
|
|
|
|
|
./run-non-streaming-decode-file-nemo.sh
|
2024-04-24 21:03:26 +08:00
|
|
|
./run-non-streaming-decode-file-paraformer.sh
|
2024-07-22 14:08:40 +08:00
|
|
|
./run-non-streaming-decode-file-sense-voice.sh
|
2025-07-08 13:45:26 +08:00
|
|
|
./run-non-streaming-decode-file-tele-speech-ctc.sh
|
|
|
|
|
./run-non-streaming-decode-file-transducer-hotwords.sh
|
2024-04-24 21:03:26 +08:00
|
|
|
./run-non-streaming-decode-file-transducer.sh
|
2025-07-08 13:45:26 +08:00
|
|
|
./run-non-streaming-decode-file-whisper-multiple.sh
|
2024-04-24 21:03:26 +08:00
|
|
|
./run-non-streaming-decode-file-whisper.sh
|
2025-07-08 13:45:26 +08:00
|
|
|
./run-non-streaming-decode-file-zipformer-ctc.sh
|
2024-04-24 21:03:26 +08:00
|
|
|
```
|
2024-04-26 09:26:39 +08:00
|
|
|
|
2025-04-29 22:55:21 +08:00
|
|
|
## Non-Streaming Speech recognition with homophone replacer
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-non-streaming-decode-file-sense-voice-with-hr.sh
|
|
|
|
|
```
|
2024-07-28 12:07:19 +08:00
|
|
|
|
2024-04-26 09:26:39 +08:00
|
|
|
## Non-Streaming text-to-speech
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-non-streaming-tts-piper-en.sh
|
|
|
|
|
./run-non-streaming-tts-coqui-de.sh
|
|
|
|
|
./run-non-streaming-tts-vits-zh.sh
|
|
|
|
|
```
|
2024-04-26 19:05:39 +08:00
|
|
|
|
2024-07-28 12:07:19 +08:00
|
|
|
## Non-Streaming text-to-speech (Play as it is generating)
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-non-streaming-tts-piper-en-with-callback.sh
|
|
|
|
|
```
|
|
|
|
|
|
2024-04-26 19:05:39 +08:00
|
|
|
## Spoken language identification
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-spoken-language-identification-whisper.sh
|
|
|
|
|
```
|
2024-04-26 22:06:48 +08:00
|
|
|
|
2024-04-28 22:26:04 +08:00
|
|
|
## Add punctuations to text
|
2024-04-26 22:06:48 +08:00
|
|
|
|
|
|
|
|
The punctuation model supports both English and Chinese.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-add-punctuation-zh-en.sh
|
|
|
|
|
```
|
2024-04-28 22:26:04 +08:00
|
|
|
|
|
|
|
|
## Audio tagging
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-audio-tagging-zipformer-from-file.sh
|
|
|
|
|
./run-audio-tagging-ced-from-file.sh
|
|
|
|
|
```
|
2024-04-29 21:23:56 +08:00
|
|
|
|
|
|
|
|
## Speaker identification
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-speaker-identification.sh
|
|
|
|
|
```
|
2024-05-28 14:59:47 +08:00
|
|
|
|
2024-06-23 18:34:18 +08:00
|
|
|
## VAD with a microphone
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-vad-from-mic.sh
|
|
|
|
|
```
|
|
|
|
|
|
2024-07-22 14:08:40 +08:00
|
|
|
## VAD with a microphone + Non-streaming SenseVoice for speech recognition
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-vad-from-mic-non-streaming-sense-voice.sh
|
|
|
|
|
```
|
|
|
|
|
|
2024-06-23 19:09:21 +08:00
|
|
|
## VAD with a microphone + Non-streaming Paraformer for speech recognition
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-vad-from-mic-non-streaming-paraformer.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## VAD with a microphone + Non-streaming Whisper tiny.en for speech recognition
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-vad-from-mic-non-streaming-whisper.sh
|
|
|
|
|
```
|
|
|
|
|
|
2024-05-28 14:59:47 +08:00
|
|
|
## VAD (Remove silence)
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-vad-remove-slience.sh
|
|
|
|
|
```
|
|
|
|
|
|
2025-04-02 21:16:14 +08:00
|
|
|
## VAD + Non-streaming Dolphin CTC for speech recognition
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-vad-non-streaming-dolphin-ctc.sh
|
|
|
|
|
```
|
|
|
|
|
|
2024-07-22 14:08:40 +08:00
|
|
|
## VAD + Non-streaming SenseVoice for speech recognition
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-vad-non-streaming-sense-voice.sh
|
|
|
|
|
```
|
|
|
|
|
|
2024-05-28 14:59:47 +08:00
|
|
|
## VAD + Non-streaming Paraformer for speech recognition
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-vad-non-streaming-paraformer.sh
|
|
|
|
|
```
|
2024-05-28 15:49:54 +08:00
|
|
|
|
|
|
|
|
## Keyword spotter
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./run-kws-from-file.sh
|
|
|
|
|
```
|