triton-asr-client / examples.py
Yuekai Zhang
add triton asr client
e3a7882
raw
history blame
11.4 kB
#!/usr/bin/env python3
#
# Copyright 2022 Xiaomi Corp. (authors: Fangjun Kuang)
#
# See LICENSE for clarification regarding multiple authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
examples = [
[
"Chinese+English",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|zh|><|en|><transcribe><notimestamps>",
"./test_wavs/tal_csasr/0.wav",
],
[
"Japanese",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|jp|><transcribe><notimestamps>",
"./test_wavs/fleurs/7760285811293653093.wav",
],
[
"Korean",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|ko|><translation><notimestamps>",
"./test_wavs/fleurs/15029788401146217023.wav",
],
[
"Korean",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|ko|><transcribe><notimestamps>",
"./test_wavs/fleurs/15029788401146217023.wav",
],
[
"Japanese",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|en|><transcribe><notimestamps>",
"./test_wavs/fleurs/7760285811293653093.wav",
],
[
"English",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|en|><transcribe><notimestamps>",
"./test_wavs/librispeech/1089-134686-0001.wav",
],
# [
# "Chinese",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/paraformer-zh/四川话.wav",
# ],
[
"Russian",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|ru|><transcribe><notimestamps>",
"./test_wavs/russian/russian-i-love-you.wav",
],
# [
# "Russian",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/russian/test.wav",
# ],
[
"German",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|de|><transcribe><notimestamps>",
"./test_wavs/german/20170517-0900-PLENARY-16-de_20170517.wav",
],
[
"Arabic",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|ar|><transcribe><notimestamps>",
"./test_wavs/arabic/a.wav",
],
# [
# "Tibetan",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/tibetan/a_0_cacm-A70_31117.wav",
# ],
[
"French",
"whisper-large-v2",
"greedy_search",
"<|startoftranscript|><|fr|><transcribe><notimestamps>",
"./test_wavs/french/common_voice_fr_19364697.wav",
],
# [
# "Chinese",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/alimeeting/R8003_M8001-8004-165.wav",
# ],
# [
# "Chinese",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/paraformer-zh/天津话.wav",
# ],
# [
# "Chinese",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/paraformer-zh/郑州话.wav",
# ],
# [
# "Chinese",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/alimeeting/R8008_M8013-8049-74.wav",
# ],
# [
# "Chinese",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/alimeeting/R8009_M8020_N_SPK8026-8026-209.wav",
# ],
# [
# "English",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/tedlium3/DanBarber_2010-219.wav",
# ],
# [
# "English",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/tedlium3/DanielKahneman_2010-157.wav",
# ],
# [
# "English",
# "whisper-large-v2",
# "greedy_search",
# 4,
# "./test_wavs/tedlium3/RobertGupta_2010U-15.wav",
# ],
# librispeech
# https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless5-2022-05-13/tree/main/test_wavs
# [
# "English",
# "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13",
# "greedy_search",
# 4,
# "./test_wavs/librispeech/1089-134686-0001.wav",
# ],
# [
# "English",
# "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13",
# "greedy_search",
# 4,
# "./test_wavs/librispeech/1221-135766-0001.wav",
# ],
# [
# "English",
# "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13",
# "greedy_search",
# 4,
# "./test_wavs/librispeech/1221-135766-0002.wav",
# ],
# # gigaspeech
# [
# "English",
# "wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2",
# "greedy_search",
# 4,
# "./test_wavs/gigaspeech/1-minute-audiobook.opus",
# ],
# [
# "English",
# "wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2",
# "greedy_search",
# 4,
# "./test_wavs/gigaspeech/100-seconds-podcast.opus",
# ],
# [
# "English",
# "wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2",
# "greedy_search",
# 4,
# "./test_wavs/gigaspeech/100-seconds-youtube.opus",
# ],
# # wenetspeech
# # https://huggingface.co/luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2/tree/main/test_wavs
# [
# "Chinese",
# "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2",
# "greedy_search",
# 4,
# "./test_wavs/wenetspeech/DEV_T0000000000.opus",
# ],
# [
# "Chinese",
# "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2",
# "greedy_search",
# 4,
# "./test_wavs/wenetspeech/DEV_T0000000001.opus",
# ],
# [
# "Chinese",
# "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2",
# "greedy_search",
# 4,
# "./test_wavs/wenetspeech/DEV_T0000000002.opus",
# ],
# # aishell2-A
# # https://huggingface.co/yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12/tree/main/test_wavs
# [
# "Chinese",
# "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12",
# "greedy_search",
# 4,
# "./test_wavs/aishell2/ID0012W0030.wav",
# ],
# [
# "Chinese",
# "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12",
# "greedy_search",
# 4,
# "./test_wavs/aishell2/ID0012W0162.wav",
# ],
# [
# "Chinese",
# "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12",
# "greedy_search",
# 4,
# "./test_wavs/aishell2/ID0012W0215.wav",
# ],
# # aishell2-B
# # https://huggingface.co/yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12/tree/main/test_wavs
# [
# "Chinese",
# "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12",
# "greedy_search",
# 4,
# "./test_wavs/aishell2/ID0012W0030.wav",
# ],
# [
# "Chinese",
# "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12",
# "greedy_search",
# 4,
# "./test_wavs/aishell2/ID0012W0162.wav",
# ],
# [
# "Chinese",
# "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12",
# "greedy_search",
# 4,
# "./test_wavs/aishell2/ID0012W0215.wav",
# ],
# # aishell2-B
# # https://huggingface.co/luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2/tree/main/test_wavs
# [
# "Chinese",
# "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
# "greedy_search",
# 4,
# "./test_wavs/aidatatang_200zh/T0055G0036S0002.wav",
# ],
# [
# "Chinese",
# "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
# "greedy_search",
# 4,
# "./test_wavs/aidatatang_200zh/T0055G0036S0003.wav",
# ],
# [
# "Chinese",
# "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
# "greedy_search",
# 4,
# "./test_wavs/aidatatang_200zh/T0055G0036S0004.wav",
# ],
# # tal_csasr
# [
# "Chinese+English",
# "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh",
# "greedy_search",
# 4,
# "./test_wavs/tal_csasr/210_36476_210_8341_1_1533271973_7057520_132.wav",
# ],
# [
# "Chinese+English",
# "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh",
# "greedy_search",
# 4,
# "./test_wavs/tal_csasr/210_36476_210_8341_1_1533271973_7057520_138.wav",
# ],
# [
# "Chinese+English",
# "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh",
# "greedy_search",
# 4,
# "./test_wavs/tal_csasr/210_36476_210_8341_1_1533271973_7057520_145.wav",
# ],
# [
# "Tibetan",
# "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless7-2022-12-02",
# "greedy_search",
# 4,
# "./test_wavs/tibetan/a_0_cacm-A70_31116.wav",
# ],
# [
# "Tibetan",
# "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless7-2022-12-02",
# "greedy_search",
# 4,
# "./test_wavs/tibetan/a_0_cacm-A70_31118.wav",
# ],
# # arabic
# [
# "Arabic",
# "AmirHussein/icefall-asr-mgb2-conformer_ctc-2022-27-06",
# "greedy_search",
# 4,
# "./test_wavs/arabic/b.wav",
# ],
# [
# "Arabic",
# "AmirHussein/icefall-asr-mgb2-conformer_ctc-2022-27-06",
# "greedy_search",
# 4,
# "./test_wavs/arabic/c.wav",
# ],
# [
# "German",
# "csukuangfj/wav2vec2.0-torchaudio",
# "greedy_search",
# 4,
# "./test_wavs/german/20120315-0900-PLENARY-14-de_20120315.wav",
# ],
# [
# "French",
# "shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14",
# "greedy_search",
# 4,
# "./test_wavs/french/common_voice_fr_19738183.wav",
# ],
# [
# "French",
# "shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14",
# "greedy_search",
# 4,
# "./test_wavs/french/common_voice_fr_27024649.wav",
# ],
]