phamhapa101 commited on
Commit
27c4115
·
verified ·
1 Parent(s): 27c91e3

Upload 13 files

Browse files
app.py ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+ import shutil
4
+ import zipfile
5
+ import sherpa_onnx
6
+ import csv
7
+ import numpy as np
8
+ import gc
9
+ import re
10
+ from pydub import AudioSegment, effects
11
+ from huggingface_hub import hf_hub_download
12
+ import urllib.request
13
+
14
+ # --- CẤU HÌNH ---
15
+ MY_REPO_ID = "hoanglinhn0/DATASET-01"
16
+ ENCODER_FILENAME = "encoder-epoch-20-avg-10.onnx"
17
+ DECODER_FILENAME = "decoder-epoch-20-avg-10.onnx"
18
+ JOINER_FILENAME = "joiner-epoch-20-avg-10.onnx"
19
+ TOKENS_FILENAME = "config.json"
20
+
21
+ ASR_SAMPLE_RATE = 16000
22
+
23
+ # --- BIẾN TOÀN CỤC ---
24
+ recognizer = None
25
+ model_status = ""
26
+
27
+ def load_asr_model():
28
+ global recognizer, model_status
29
+ try:
30
+ print("⏳ Đang tải ASR model...")
31
+ encoder = hf_hub_download(repo_id=MY_REPO_ID, filename=ENCODER_FILENAME, repo_type="space")
32
+ decoder = hf_hub_download(repo_id=MY_REPO_ID, filename=DECODER_FILENAME, repo_type="space")
33
+ joiner = hf_hub_download(repo_id=MY_REPO_ID, filename=JOINER_FILENAME, repo_type="space")
34
+ tokens_raw = hf_hub_download(repo_id=MY_REPO_ID, filename=TOKENS_FILENAME, repo_type="space")
35
+
36
+ tokens_clean_path = "tokens_fixed.txt"
37
+ with open(tokens_raw, 'r', encoding='utf-8') as f_in:
38
+ lines = f_in.readlines()
39
+ with open(tokens_clean_path, 'w', encoding='utf-8') as f_out:
40
+ f_out.writelines(lines)
41
+
42
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
43
+ encoder=encoder, decoder=decoder, joiner=joiner,
44
+ tokens=tokens_clean_path, num_threads=4,
45
+ sample_rate=ASR_SAMPLE_RATE, decoding_method="greedy_search"
46
+ )
47
+ return "OK"
48
+ except Exception as e:
49
+ return str(e)
50
+
51
+ model_status = load_asr_model()
52
+
53
+ def process_audio_vad(audio_files, min_speech_duration, min_silence_duration, buffer_seconds):
54
+ if model_status != "OK":
55
+ return None, f"❌ Lỗi ASR Model: {model_status}"
56
+ if not audio_files:
57
+ return None, "Vui lòng chọn ít nhất một file audio."
58
+
59
+ temp_dir = "piper_dataset_final"
60
+ if os.path.exists(temp_dir): shutil.rmtree(temp_dir)
61
+ os.makedirs(temp_dir, exist_ok=True)
62
+
63
+ logs = []
64
+ csv_data = []
65
+ file_counter = 0
66
+ skipped_short = 0
67
+
68
+ try:
69
+ logs.append(f"📂 Đã chọn {len(audio_files)} file. Xử lý theo thứ tự...")
70
+
71
+ vad_path = "silero_vad.onnx"
72
+ if not os.path.exists(vad_path):
73
+ logs.append("⏳ Đang tải silero_vad.onnx...")
74
+ urllib.request.urlretrieve(
75
+ "https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx",
76
+ vad_path
77
+ )
78
+ logs.append("✅ Tải VAD xong.")
79
+ else:
80
+ logs.append("✅ VAD model đã có sẵn.")
81
+
82
+ vad_config = sherpa_onnx.VadModelConfig()
83
+ vad_config.silero_vad.model = vad_path
84
+ vad_config.silero_vad.min_speech_duration = min_speech_duration
85
+ vad_config.silero_vad.min_silence_duration = min_silence_duration
86
+ vad_config.sample_rate = ASR_SAMPLE_RATE
87
+
88
+ vad_engine = sherpa_onnx.VoiceActivityDetector(vad_config, buffer_size_in_seconds=60)
89
+
90
+ buffer_samples = int(buffer_seconds * ASR_SAMPLE_RATE)
91
+
92
+ for idx, audio_file in enumerate(audio_files, 1):
93
+ original_name = os.path.splitext(os.path.basename(audio_file))[0]
94
+ original_name = re.sub(r'[^a-zA-Z0-9_-]', '_', original_name)
95
+ logs.append(f"🔄 File {idx}/{len(audio_files)}: {original_name}")
96
+
97
+ sound = AudioSegment.from_file(audio_file).set_frame_rate(ASR_SAMPLE_RATE).set_channels(1)
98
+ full_samples = np.array(sound.get_array_of_samples()).astype(np.float32) / 32768.0
99
+
100
+ padding = np.zeros(int(ASR_SAMPLE_RATE * 1.0), dtype=np.float32)
101
+ samples = np.concatenate((full_samples, padding))
102
+
103
+ window_size = vad_config.silero_vad.window_size
104
+ i = 0
105
+ total_len = len(samples)
106
+ while i < total_len:
107
+ chunk = samples[i : i + window_size]
108
+ vad_engine.accept_waveform(chunk)
109
+ i += len(chunk)
110
+
111
+ speech_segments = []
112
+ while not vad_engine.empty():
113
+ segment_samples = np.array(vad_engine.front.samples, dtype=np.float32)
114
+ speech_segments.append(segment_samples)
115
+ vad_engine.pop()
116
+
117
+ for chunk_samples in speech_segments:
118
+ duration = len(chunk_samples) / ASR_SAMPLE_RATE
119
+ if duration < min_speech_duration:
120
+ skipped_short += 1
121
+ continue
122
+
123
+ # === THÊM BUFFER AN TOÀN ===
124
+ chunk_with_buffer = np.concatenate([
125
+ np.zeros(buffer_samples, dtype=np.float32),
126
+ chunk_samples,
127
+ np.zeros(buffer_samples, dtype=np.float32)
128
+ ])
129
+
130
+ # Chuyển sang pydub để trim silence đầu/cuối
131
+ chunk_audio = AudioSegment(
132
+ (chunk_with_buffer * 32767).astype(np.int16).tobytes(),
133
+ frame_rate=ASR_SAMPLE_RATE,
134
+ sample_width=2,
135
+ channels=1
136
+ ).set_frame_rate(22050)
137
+
138
+ # Trim silence đầu/cuối (ngưỡng -50dB)
139
+ chunk_audio = effects.strip_silence(chunk_audio, silence_thresh=-50, padding=0)
140
+
141
+ # Nhận dạng văn bản
142
+ final_samples = np.array(chunk_audio.get_array_of_samples()).astype(np.float32) / 32767.0
143
+ s = recognizer.create_stream()
144
+ s.accept_waveform(ASR_SAMPLE_RATE, final_samples)
145
+ recognizer.decode_stream(s)
146
+ text = s.result.text.strip()
147
+
148
+ if text and len(text) > 2:
149
+ filename = f"{original_name}_{file_counter:05d}.wav"
150
+ filepath = os.path.join(temp_dir, filename)
151
+ chunk_audio.export(filepath, format="wav")
152
+ csv_data.append([filename, text])
153
+ file_counter += 1
154
+
155
+ csv_path = os.path.join(temp_dir, "metadata.csv")
156
+ with open(csv_path, mode='w', encoding='utf-8-sig', newline='') as f:
157
+ writer = csv.writer(f, delimiter='|')
158
+ writer.writerows(csv_data)
159
+
160
+ zip_path = "dataset_piper_vad_v2.zip"
161
+ if os.path.exists(zip_path): os.remove(zip_path)
162
+ with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
163
+ for root, _, files in os.walk(temp_dir):
164
+ for file in files:
165
+ zipf.write(os.path.join(root, file), arcname=file)
166
+
167
+ logs.append(f"🎉 HOÀN TẤT! Tạo {file_counter} đoạn ≥ {min_speech_duration}s (đã thêm buffer {buffer_seconds}s)")
168
+ if skipped_short > 0:
169
+ logs.append(f" (Bỏ qua {skipped_short} đoạn ngắn hơn {min_speech_duration}s)")
170
+ return zip_path, "\n".join(logs)
171
+
172
+ except Exception as e:
173
+ return None, f"❌ Lỗi: {str(e)}"
174
+ finally:
175
+ gc.collect()
176
+
177
+ # --- UI ---
178
+ with gr.Blocks(theme=gr.themes.Soft(primary_hue="green")) as demo:
179
+ gr.Markdown("# 🎙️ Piper Dataset Maker - VAD V2 (Có Buffer chống cắt giữa từ)")
180
+ gr.Markdown("""
181
+ **Để tránh cắt giữa từ:**
182
+ - Tăng **Khoảng lặng tối thiểu** lên 1.8–2.5 giây
183
+ - Dùng **Buffer an toàn** (mặc định 0.3 giây) để thêm đệm trước/sau đoạn
184
+ """)
185
+
186
+ with gr.Row():
187
+ with gr.Column():
188
+ audio_input = gr.File(
189
+ label="📁 Chọn nhiều file audio (Ctrl + click)",
190
+ file_count="multiple",
191
+ type="filepath"
192
+ )
193
+ with gr.Row():
194
+ min_speech = gr.Slider(1.0, 5.0, value=2.0, step=0.1, label="Độ dài câu tối thiểu (giây)")
195
+ min_silence = gr.Slider(0.5, 4.0, value=1.8, step=0.1, label="Khoảng lặng tối thiểu để cắt (giây) ← tăng để tránh cắt giữa từ")
196
+ buffer_sec = gr.Slider(0.0, 0.8, value=0.3, step=0.1, label="Buffer an toàn trước/sau đoạn (giây)")
197
+ btn_run = gr.Button("🚀 BẮT ĐẦU TRÍCH XUẤT", variant="primary")
198
+ with gr.Column():
199
+ logs = gr.Textbox(label="Nhật ký hệ thống", lines=15)
200
+ file_output = gr.File(label="📥 Tải bộ Dataset ZIP")
201
+
202
+ btn_run.click(process_audio_vad,
203
+ inputs=[audio_input, min_speech, min_silence, buffer_sec],
204
+ outputs=[file_output, logs])
205
+
206
+ if __name__ == "__main__":
207
+ demo.launch()
config(1).json ADDED
@@ -0,0 +1,2000 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <blk> 0
2
+ <sos/eos> 1
3
+ <unk> 2
4
+ ▁HAI 3
5
+ ▁KHÔNG 4
6
+ ▁TRĂM 5
7
+ ▁MỘT 6
8
+ ▁BA 7
9
+ ▁MƯƠI 8
10
+ ▁LÀ 9
11
+ ▁NĂM 10
12
+ ▁VÀ 11
13
+ ▁CỦA 12
14
+ ▁CHÍN 13
15
+ ▁SÁU 14
16
+ ▁TÁM 15
17
+ ▁BỐN 16
18
+ ▁CÓ 17
19
+ N 18
20
+ I 19
21
+ ▁CÁC 20
22
+ ▁TRONG 21
23
+ T 22
24
+ NG 23
25
+ ▁ĐƯỢC 24
26
+ ▁CHO 25
27
+ ▁VỚI 26
28
+ ▁NGƯỜI 27
29
+ ▁ĐÃ 28
30
+ M 29
31
+ ▁MƯỜI 30
32
+ ▁NGHÌN 31
33
+ ▁NGÀY 32
34
+ O 33
35
+ ▁NGÀN 34
36
+ ▁BẢY 35
37
+ ▁BẨY 36
38
+ U 37
39
+ ▁NÀY 38
40
+ ▁NHỮNG 39
41
+ ▁CÔNG 40
42
+ ▁RA 41
43
+ C 42
44
+ ▁Ở 43
45
+ ▁ĐỂ 44
46
+ ▁TRÊN 45
47
+ ▁ĐÓ 46
48
+ ▁KHI 47
49
+ ▁TẠI 48
50
+ ▁ĐẾN 49
51
+ Y 50
52
+ P 51
53
+ ▁THÌ 52
54
+ ▁SẼ 53
55
+ ▁VỀ 54
56
+ ▁CŨNG 55
57
+ ▁NHƯ 56
58
+ A 57
59
+ ▁MÀ 58
60
+ ▁TỪ 59
61
+ ▁THÁNG 60
62
+ ▁MÌNH 61
63
+ ▁CÁI 62
64
+ ▁GIỜ 63
65
+ ▁VÀO 64
66
+ ▁PHẨY 65
67
+ ▁ANH 66
68
+ ▁THỂ 67
69
+ ▁THÀNH 68
70
+ ▁NAM 69
71
+ ▁ÂM 70
72
+ ▁ĐỒNG 71
73
+ ▁SỐ 72
74
+ ▁LẠI 73
75
+ ▁BỊ 74
76
+ ▁NHÀ 75
77
+ ▁QUỐC 76
78
+ ▁ĐẦU 77
79
+ ▁HIỆN 78
80
+ ▁NHIỀU 79
81
+ ▁LÀM 80
82
+ ▁B 81
83
+ ▁ĐI 82
84
+ S 83
85
+ ▁PHẢI 84
86
+ ▁SỰ 85
87
+ ▁VIỆT 86
88
+ ▁ÔNG 87
89
+ ▁THEO 88
90
+ ▁ 89
91
+ ▁TÔI 90
92
+ ▁EM 91
93
+ ▁SAU 92
94
+ ▁VIỆC 93
95
+ ▁CHÍNH 94
96
+ ▁TRIỆU 95
97
+ ▁NƯỚC 96
98
+ ▁TA 97
99
+ ▁NHÂN 98
100
+ ▁A 99
101
+ ▁BẠN 100
102
+ ▁CON 101
103
+ ▁ĐỘNG 102
104
+ ▁BỘ 103
105
+ ▁S 104
106
+ ▁CHẤM 105
107
+ ▁GIA 106
108
+ ▁HÀNG 107
109
+ ▁CHỈ 108
110
+ ▁THÔNG 109
111
+ ▁THẾ 110
112
+ ▁M 111
113
+ ▁MỐT 112
114
+ ▁QUAN 113
115
+ E 114
116
+ ▁NÓ 115
117
+ ▁BIẾT 116
118
+ ▁NHƯNG 117
119
+ ▁ĐÂY 118
120
+ ▁V 119
121
+ ▁TRUNG 120
122
+ ▁HƠN 121
123
+ ▁ĐANG 122
124
+ ▁CÒN 123
125
+ ▁TƯ 124
126
+ ▁TỚI 125
127
+ ▁ĐỊNH 126
128
+ ▁VIÊN 127
129
+ ▁NHẤT 128
130
+ ▁RẤT 129
131
+ ▁MỚI 130
132
+ ▁TRƯỚC 131
133
+ ▁CA 132
134
+ ▁CHÚNG 133
135
+ ▁QUA 134
136
+ ▁C 135
137
+ G 136
138
+ H 137
139
+ ▁CƠ 138
140
+ ▁ĐIỀU 139
141
+ ▁THỜI 140
142
+ ▁HỌC 141
143
+ ▁TRƯỜNG 142
144
+ ▁DÂN 143
145
+ ▁GIÁ 144
146
+ ▁TIN 145
147
+ ▁CẢ 146
148
+ ▁PHÁT 147
149
+ ▁HỘI 148
150
+ ▁I 149
151
+ ▁CÙNG 150
152
+ ▁L 151
153
+ ▁NÓI 152
154
+ ▁ẢNH 153
155
+ ▁RỒI 154
156
+ ▁R 155
157
+ ▁AN 156
158
+ ▁LÊN 157
159
+ NH 158
160
+ ▁SINH 159
161
+ ▁THỰC 160
162
+ ▁TH 161
163
+ ▁HÀNH 162
164
+ ▁NHẬN 163
165
+ ▁VỤ 164
166
+ ▁HÌNH 165
167
+ ▁ĐỐI 166
168
+ ▁HỢP 167
169
+ ▁NGANG 168
170
+ ▁VÌ 169
171
+ ▁DO 170
172
+ D 171
173
+ ▁MỸ 172
174
+ ▁TẾ 173
175
+ ▁THẤY 174
176
+ ▁XE 175
177
+ ▁CUỘC 176
178
+ ▁Đ 177
179
+ ▁CHỦ 178
180
+ ▁G 179
181
+ R 180
182
+ ▁TIẾP 181
183
+ ▁N 182
184
+ ▁ĐỀ 183
185
+ ▁THỦ 184
186
+ ▁CÔ 185
187
+ ▁HÀ 186
188
+ ▁ĐẠI 187
189
+ ▁LINH 188
190
+ ▁H 189
191
+ ▁CAO 190
192
+ ▁ĐỘ 191
193
+ ▁SẢN 192
194
+ ▁BÁO 193
195
+ ▁KẾT 194
196
+ ▁CÁCH 195
197
+ ▁T 196
198
+ ▁NAY 197
199
+ ▁LIÊN 198
200
+ ▁D 199
201
+ ▁NÊN 200
202
+ ▁XUẤT 201
203
+ ▁GẠCH 202
204
+ ▁E 203
205
+ ▁DỤNG 204
206
+ ▁DỰ 205
207
+ ▁NÀO 206
208
+ ▁LÝ 207
209
+ ▁CHỨC 208
210
+ ▁TRÌNH 209
211
+ ▁THỊ 210
212
+ ▁GÌ 211
213
+ ▁LƯỢNG 212
214
+ ▁BẢN 213
215
+ ▁GIỚI 214
216
+ ▁O 215
217
+ ▁MÉT 216
218
+ ▁TỔNG 217
219
+ ▁RẰNG 218
220
+ ▁KHÁC 219
221
+ ▁ĐƯỜNG 220
222
+ ▁PHÚT 221
223
+ ▁TÌNH 222
224
+ ▁HỌ 223
225
+ ▁NGHIỆP 224
226
+ ▁THỐNG 225
227
+ B 226
228
+ ▁TĂNG 227
229
+ ▁U 228
230
+ ▁ĐIỂM 229
231
+ ▁CHỊ 230
232
+ - 231
233
+ ▁TIỀN 232
234
+ ▁VẪN 233
235
+ ER 234
236
+ ▁NỘI 235
237
+ ▁TÀI 236
238
+ ▁PHẦN 237
239
+ ▁KINH 238
240
+ K 239
241
+ CH 240
242
+ ▁BÌNH 241
243
+ ▁PHỐ 242
244
+ ▁GIẢI 243
245
+ ▁KHU 244
246
+ ▁NG 245
247
+ ▁TÁC 246
248
+ ▁VẬY 247
249
+ ▁CẦU 248
250
+ ▁LẺ 249
251
+ ▁HAY 250
252
+ ▁CH 251
253
+ ▁NH 252
254
+ ▁CHÉO 253
255
+ ▁THỨ 254
256
+ AN 255
257
+ ▁LỰC 256
258
+ ▁TÂM 257
259
+ Ế 258
260
+ ▁PHÒNG 259
261
+ ▁TỰ 260
262
+ ▁GIAO 261
263
+ ▁TOÀN 262
264
+ ▁LẦN 263
265
+ ▁VĂN 264
266
+ ▁BẢO 265
267
+ ▁MẶT 266
268
+ ▁MINH 267
269
+ ▁NĂNG 268
270
+ ▁THƯƠNG 269
271
+ ▁VỊ 270
272
+ ▁GIÂY 271
273
+ ▁Ý 272
274
+ ▁TỔ 273
275
+ ▁DIỄN 274
276
+ ▁CẤP 275
277
+ ▁BÀ 276
278
+ ▁BỐ 277
279
+ ▁X 278
280
+ RA 279
281
+ ▁ĐIỆN 280
282
+ ▁ĐỘI 281
283
+ ▁BÊN 282
284
+ ▁DỊCH 283
285
+ ▁LỚN 284
286
+ L 285
287
+ ▁TẬP 286
288
+ ▁PHÁP 287
289
+ ▁MÁY 288
290
+ ▁BỆNH 289
291
+ Á 290
292
+ ▁ĂN 291
293
+ ▁TUỔI 292
294
+ ▁QUÁ 293
295
+ ▁KHOẢNG 294
296
+ ▁CHƯA 295
297
+ ▁SAO 296
298
+ ▁DOANH 297
299
+ ▁NẾU 298
300
+ ▁THU 299
301
+ ▁NGOÀI 300
302
+ ▁HỆ 301
303
+ ▁VI 302
304
+ ▁VỪA 303
305
+ ▁BẰNG 304
306
+ ▁TIÊN 305
307
+ Ả 306
308
+ ▁CẢM 307
309
+ ▁CẢNH 308
310
+ ▁TRIỂN 309
311
+ ▁CHIẾN 310
312
+ ▁XÃ 311
313
+ ▁QUY 312
314
+ ▁CẦN 313
315
+ ▁TRỪ 314
316
+ ▁BAN 315
317
+ V 316
318
+ ▁THANH 317
319
+ ▁QUÂN 318
320
+ ▁K 319
321
+ ▁GIAN 320
322
+ ▁BẮT 321
323
+ ▁THƯỜNG 322
324
+ ▁NHIÊN 323
325
+ ▁LĂM 324
326
+ ▁KI 325
327
+ ▁ÁN 326
328
+ ▁THI 327
329
+ ▁PHƯƠNG 328
330
+ ▁KHÁCH 329
331
+ ▁ĐƯA 330
332
+ ▁TẠO 331
333
+ ▁TR 332
334
+ ▁TÍNH 333
335
+ ▁P 334
336
+ ▁SỬ 335
337
+ Ắ 336
338
+ Ạ 337
339
+ ▁Y 338
340
+ ▁TRA 339
341
+ ▁GẦN 340
342
+ ▁KỲ 341
343
+ ▁TRỞ 342
344
+ ▁LO 343
345
+ ▁TRANG 344
346
+ Ô 345
347
+ ▁QUẢ 346
348
+ ▁CỘNG 347
349
+ ▁Ạ 348
350
+ ▁TỈNH 349
351
+ Ố 350
352
+ ▁SÁT 351
353
+ RI 352
354
+ ▁MUỐN 353
355
+ ▁TRỌNG 354
356
+ IN 355
357
+ ▁SĨ 356
358
+ ▁CHÍ 357
359
+ ▁HÓA 358
360
+ ▁Á 359
361
+ ▁QUYẾT 360
362
+ . 361
363
+ ▁TRƯỞNG 362
364
+ ▁BÁN 363
365
+ ▁YÊU 364
366
+ ▁THỨC 365
367
+ ▁SỐNG 366
368
+ ▁TRỊ 367
369
+ ▁MI 368
370
+ ▁TY 369
371
+ ▁NHĂM 370
372
+ ▁CHI 371
373
+ ▁HIỆU 372
374
+ ▁VỰC 373
375
+ ▁NGUYỄN 374
376
+ ▁ĐẠO 375
377
+ ▁SỞ 376
378
+ X 377
379
+ ▁THAM 378
380
+ ▁F 379
381
+ ▁LÚC 380
382
+ RO 381
383
+ ▁SO 382
384
+ ▁ĐỊA 383
385
+ ▁GIÚP 384
386
+ ▁BẤT 385
387
+ ▁MẠNH 386
388
+ ▁TIÊU 387
389
+ ▁TÊN 388
390
+ ▁TỤC 389
391
+ ▁HÔM 390
392
+ ▁NỮA 391
393
+ Ấ 392
394
+ ▁GA 393
395
+ RE 394
396
+ ▁CÁ 395
397
+ Ê 396
398
+ ▁LI 397
399
+ EN 398
400
+ ▁HỒ 399
401
+ ▁CHUYỂN 400
402
+ ▁CHIẾC 401
403
+ ▁MA 402
404
+ ▁LÔ 403
405
+ ▁CHIA 404
406
+ ▁GI 405
407
+ ▁PHẨM 406
408
+ Z 407
409
+ Ọ 408
410
+ ▁KIỂM 409
411
+ ▁HOẠT 410
412
+ LE 411
413
+ ▁CHẤT 412
414
+ ▁HOA 413
415
+ ▁NỮ 414
416
+ ▁TIẾN 415
417
+ ▁LUÔN 416
418
+ ▁ĐẤU 417
419
+ ▁TAY 418
420
+ W 419
421
+ LA 420
422
+ ▁VẤN 421
423
+ ▁LOẠI 422
424
+ ▁HOÀN 423
425
+ ▁ĐÔNG 424
426
+ ▁BAY 425
427
+ ▁NGHỆ 426
428
+ ▁TÌM 427
429
+ ▁TIẾNG 428
430
+ ▁NHAU 429
431
+ ▁KHIẾN 430
432
+ ▁HẾT 431
433
+ ▁KHÓ 432
434
+ ▁BIỆT 433
435
+ Ệ 434
436
+ ▁GIẢM 435
437
+ ▁ĐẶC 436
438
+ ▁ĐÁNH 437
439
+ ▁TUY 438
440
+ / 439
441
+ ▁MUA 440
442
+ ▁ĐỔI 441
443
+ ▁THÊM 442
444
+ ▁TRẬN 443
445
+ ▁DI 444
446
+ ▁THIẾT 445
447
+ ▁ĐÚNG 446
448
+ NA 447
449
+ ▁QUYỀN 448
450
+ ▁CHUYỆN 449
451
+ ▁SÁNG 450
452
+ ▁MỨC 451
453
+ ▁ĐÌNH 452
454
+ AR 453
455
+ ▁NGA 454
456
+ Â 455
457
+ ON 456
458
+ ▁GIỮA 457
459
+ ▁CỔ 458
460
+ Ồ 459
461
+ ▁CÂU 460
462
+ ▁THÂN 461
463
+ ▁MẸ 462
464
+ ▁LỜI 463
465
+ Ò 464
466
+ ▁MỌI 465
467
+ ▁VÒNG 466
468
+ ▁MANG 467
469
+ ▁ÉP 468
470
+ ▁CỨU 469
471
+ F 470
472
+ Ù 471
473
+ ▁NGÂN 472
474
+ ▁KHAI 473
475
+ ▁ĐẤT 474
476
+ ▁MẠNG 475
477
+ ▁DÙNG 476
478
+ À 477
479
+ ▁TƯỢNG 478
480
+ ▁BAO 479
481
+ ▁ĐOÀN 480
482
+ ▁ĐỀU 481
483
+ LI 482
484
+ ▁KIẾN 483
485
+ ▁TRÍ 484
486
+ ▁TRẺ 485
487
+ ▁TỐT 486
488
+ ▁AI 487
489
+ ▁PHẠM 488
490
+ ▁NHẬP 489
491
+ ▁TRUYỀN 490
492
+ ▁DẪN 491
493
+ ▁XEM 492
494
+ ▁CHƯƠNG 493
495
+ Ộ 494
496
+ ▁ỨNG 495
497
+ ▁TẤN 496
498
+ EL 497
499
+ ▁QUÝ 498
500
+ ▁TRỢ 499
501
+ ▁LẬP 500
502
+ ▁NGUYÊN 501
503
+ ▁TÍCH 502
504
+ ▁VIỆN 503
505
+ ▁VÔ 504
506
+ ▁PHỦ 505
507
+ ▁GÂY 506
508
+ ▁GIẢ 507
509
+ ▁THÁI 508
510
+ ▁NGHỊ 509
511
+ ▁BỎ 510
512
+ ES 511
513
+ ▁KẾ 512
514
+ ▁GỌI 513
515
+ ▁GIÁO 514
516
+ ▁BIỂN 515
517
+ ▁NGAY 516
518
+ ▁LA 517
519
+ ▁CHUNG 518
520
+ ▁NHẬT 519
521
+ ▁SÁCH 520
522
+ ▁GẶP 521
523
+ ▁CHÂU 522
524
+ ▁TỪNG 523
525
+ ST 524
526
+ É 525
527
+ ▁DU 526
528
+ ▁KH 527
529
+ ▁CỨ 528
530
+ ▁ĐƠN 529
531
+ ▁CỐ 530
532
+ ▁HOẶC 531
533
+ ▁TỬ 532
534
+ ▁XÁC 533
535
+ ▁HẢI 534
536
+ ▁ĐĂNG 535
537
+ ▁ĐẸP 536
538
+ ▁DIỆN 537
539
+ ▁ĐÁ 538
540
+ ▁CUỐI 539
541
+ ▁SỨC 540
542
+ ▁ĐẤY 541
543
+ ▁CHẾ 542
544
+ ▁THÔI 543
545
+ Ã 544
546
+ ▁BÀN 545
547
+ ▁NGUỒN 546
548
+ ▁XOẸT 547
549
+ ▁HỘ 548
550
+ ▁XUỘC 549
551
+ ▁CHỨNG 550
552
+ ▁NHIỆM 551
553
+ AL 552
554
+ ▁GIỮ 553
555
+ ▁TẤT 554
556
+ ▁LỊCH 555
557
+ ▁BÓNG 556
558
+ ▁MỖI 557
559
+ ▁GỜ 558
560
+ ▁ẤY 559
561
+ ▁VŨ 560
562
+ ▁BỞI 561
563
+ ▁PHỤ 562
564
+ ▁KHÍ 563
565
+ Ầ 564
566
+ ▁VỆ 565
567
+ ▁CÁO 566
568
+ ▁THUỘC 567
569
+ ▁TI 568
570
+ ▁DA 569
571
+ ▁HỒI 570
572
+ ▁NHÌN 571
573
+ ▁HÒA 572
574
+ ▁THÍCH 573
575
+ ▁THAY 574
576
+ LO 575
577
+ ▁SA 576
578
+ IA 577
579
+ ▁KHỐI 578
580
+ ▁VẬT 579
581
+ CO 580
582
+ ▁XÂY 581
583
+ ▁HOÀNG 582
584
+ ▁MỜ 583
585
+ Ớ 584
586
+ ▁HA 585
587
+ ▁DÙ 586
588
+ ▁VÊ 587
589
+ ▁BIỂU 588
590
+ ▁HỎI 589
591
+ ▁HO 590
592
+ ▁TO 591
593
+ ▁DỰNG 592
594
+ ▁BÂY 593
595
+ ▁MỞ 594
596
+ ▁PHÍA 595
597
+ ▁ĐÊ 596
598
+ ▁SÂN 597
599
+ ▁KÝ 598
600
+ ▁ĐOẠN 599
601
+ ▁PHỤC 600
602
+ ▁CHÚ 601
603
+ ▁NGOẠI 602
604
+ ▁LAN 603
605
+ ▁ĐỒ 604
606
+ ▁TÀU 605
607
+ ▁LỜ 606
608
+ ▁DANH 607
609
+ ▁BIẾN 608
610
+ ▁ĐẠT 609
611
+ ▁DÀI 610
612
+ Ư 611
613
+ ▁KHẨU 612
614
+ ▁NƠI 613
615
+ ▁HƯỚNG 614
616
+ J 615
617
+ ▁RỜ 616
618
+ ▁LUẬT 617
619
+ ▁CHUYÊN 618
620
+ ▁TRANH 619
621
+ ▁ĐÂU 620
622
+ ▁NỜ 621
623
+ ▁NGHĨ 622
624
+ ▁DÉT 623
625
+ OR 624
626
+ ▁KHÁ 625
627
+ Ỡ 626
628
+ ▁BÉ 627
629
+ ▁MẤT 628
630
+ ▁GÁI 629
631
+ ▁QUẢN 630
632
+ ▁HẠN 631
633
+ ▁LỘ 632
634
+ ▁DẠ 633
635
+ ▁XIN 634
636
+ Ú 635
637
+ ▁KHOA 636
638
+ ▁NHÓM 637
639
+ ▁ĐÔ 638
640
+ HA 639
641
+ ▁GHI 640
642
+ ▁PH 641
643
+ Ơ 642
644
+ ▁HUYỆN 643
645
+ ▁GIÁM 644
646
+ ▁ĐỨC 645
647
+ TE 646
648
+ TA 647
649
+ ▁CHƠI 648
650
+ ▁SANG 649
651
+ ▁KỂ 650
652
+ ▁THẬT 651
653
+ ▁LIỆU 652
654
+ ▁PHIM 653
655
+ ▁THOẠI 654
656
+ ▁XUỐNG 655
657
+ ▁TRẢ 656
658
+ ▁LỢI 657
659
+ ▁LẤY 658
660
+ ▁Ô 659
661
+ ▁KHOẢN 660
662
+ ▁MẮT 661
663
+ ▁KIỆN 662
664
+ ▁CO 663
665
+ ▁ĐẶT 664
666
+ ▁CHỌN 665
667
+ ▁OÁT 666
668
+ ▁VẬN 667
669
+ ▁LUYỆN 668
670
+ ▁THẮNG 669
671
+ ▁HỮU 670
672
+ ▁TỜ 671
673
+ ▁CHỐNG 672
674
+ ▁TUẦN 673
675
+ MA 674
676
+ ▁TƯƠNG 675
677
+ ▁BÀI 676
678
+ ▁ĐA 677
679
+ ▁HẬU 678
680
+ ▁NHỎ 679
681
+ ▁PHÁ 680
682
+ ▁KHẢ 681
683
+ ▁HỖ 682
684
+ ▁W 683
685
+ ▁BẮC 684
686
+ ▁MỤC 685
687
+ ▁CỬA 686
688
+ ▁RÕ 687
689
+ Ă 688
690
+ ▁À 689
691
+ ▁NẠN 690
692
+ ▁MẪU 691
693
+ ▁NỔI 692
694
+ ▁TƯỚNG 693
695
+ ▁VÀNG 694
696
+ ▁TỊCH 695
697
+ ▁LÃNH 696
698
+ ▁XI 697
699
+ ▁ĐỜI 698
700
+ ▁USD 699
701
+ ▁SẺ 700
702
+ ▁ỦY 701
703
+ Ó 702
704
+ ▁TU 703
705
+ ▁NA 704
706
+ ▁XỬ 705
707
+ ▁SE 706
708
+ NE 707
709
+ CK 708
710
+ ▁DƯƠNG 709
711
+ ▁DƯỚI 710
712
+ ▁TIẾT 711
713
+ ▁XẢY 712
714
+ ▁RO 713
715
+ ▁ÍT 714
716
+ ▁SƯ 715
717
+ ▁NGHE 716
718
+ ▁QU 717
719
+ ▁CHUẨN 718
720
+ ▁VÙNG 719
721
+ ▁TRÁI 720
722
+ ▁THUẬT 721
723
+ ▁NINH 722
724
+ ▁HÁT 723
725
+ ▁BÁC 724
726
+ ▁TỐ 725
727
+ ▁NGHIỆM 726
728
+ ▁HIỂU 727
729
+ ▁TRÒ 728
730
+ ▁NGHĨA 729
731
+ TH 730
732
+ ▁VÍ 731
733
+ ▁CHA 732
734
+ ▁CỤ 733
735
+ ▁BÊ 734
736
+ ▁VUÔNG 735
737
+ ▁NHA 736
738
+ ▁ĐỦ 737
739
+ ▁MÃ 738
740
+ TI 739
741
+ Í 740
742
+ Ụ 741
743
+ ▁THƯ 742
744
+ ▁PHONG 743
745
+ ▁ÁP 744
746
+ ▁TRỰC 745
747
+ ▁VỢ 746
748
+ LL 747
749
+ ▁PHÓ 748
750
+ ▁PHÂN 749
751
+ ▁CUNG 750
752
+ ▁TÂY 751
753
+ ▁ÍCH 752
754
+ US 753
755
+ ▁PHÍ 754
756
+ Ở 755
757
+ ▁GỒM 756
758
+ DA 757
759
+ TO 758
760
+ ▁CHÂN 759
761
+ ▁KIM 760
762
+ ▁TRÚ 761
763
+ ▁PHI 762
764
+ ▁LUẬN 763
765
+ ▁HOẠCH 764
766
+ ▁TẢI 765
767
+ ▁NHANH 766
768
+ ▁HUẤN 767
769
+ NI 768
770
+ SS 769
771
+ ▁ĐÁNG 770
772
+ ▁TỨC 771
773
+ ▁CHẾT 772
774
+ ▁CỰC 773
775
+ ▁NHẰM 774
776
+ ▁VỌNG 775
777
+ ▁HUY 776
778
+ ▁TỐI 777
779
+ ▁TUYÊN 778
780
+ ▁BÍ 779
781
+ ▁HƯỞNG 780
782
+ BA 781
783
+ ▁VỐN 782
784
+ ▁NGHIÊN 783
785
+ ▁LƯU 784
786
+ ▁CÂY 785
787
+ ▁LÒNG 786
788
+ ▁BƯỚC 787
789
+ ▁HẠ 788
790
+ ▁LỄ 789
791
+ ▁ĐÀN 790
792
+ ▁CỬ 791
793
+ ▁BỜ 792
794
+ ▁MÊ 793
795
+ ▁TINH 794
796
+ Ì 795
797
+ ▁CHỒNG 796
798
+ ET 797
799
+ ▁THUẬN 798
800
+ ▁CHU 799
801
+ ▁TUYỂN 800
802
+ ▁THẦN 801
803
+ ▁TÔ 802
804
+ ▁ĐỐC 803
805
+ ▁MÀU 804
806
+ UR 805
807
+ ▁CẠNH 806
808
+ ▁SẮC 807
809
+ ▁SƠN 808
810
+ ▁NHẠC 809
811
+ ▁NÔNG 810
812
+ DE 811
813
+ ỀN 812
814
+ ▁QUẢNG 813
815
+ ▁ĐÓNG 814
816
+ ▁VUI 815
817
+ ▁ĐỨNG 816
818
+ ▁TRẦN 817
819
+ ▁LAO 818
820
+ ▁ẤN 819
821
+ ▁PHIÊN 820
822
+ ▁XÊ 821
823
+ ▁ĐẢO 822
824
+ ▁XÉT 823
825
+ ▁KHỎI 824
826
+ ▁CHỨ 825
827
+ ▁SU 826
828
+ ▁NGÀNH 827
829
+ ▁HY 828
830
+ ▁PHÓNG 829
831
+ ▁PHÉP 830
832
+ ▁CHẠY 831
833
+ ▁HÀN 832
834
+ ▁MÙA 833
835
+ ▁MẠI 834
836
+ CE 835
837
+ Ứ 836
838
+ ▁ĐÀO 837
839
+ ▁CÀNG 838
840
+ ▁CHIỀU 839
841
+ VI 840
842
+ ▁MẶC 841
843
+ ▁CHẮC 842
844
+ CA 843
845
+ ▁RIÊNG 844
846
+ ▁VỜ 845
847
+ ▁TRAI 846
848
+ ▁GIỐNG 847
849
+ ▁BI 848
850
+ ▁NHỚ 849
851
+ ▁YẾU 850
852
+ ▁GỬI 851
853
+ ▁TRÁCH 852
854
+ ▁IN 853
855
+ ▁DUNG 854
856
+ ▁DUY 855
857
+ DI 856
858
+ ▁BIÊN 857
859
+ ▁XA 858
860
+ ▁ĐỘC 859
861
+ ▁CƯ 860
862
+ ▁TỶ 861
863
+ ▁NGHI 862
864
+ ▁TRẠNG 863
865
+ ▁NẰM 864
866
+ ▁PHẢN 865
867
+ ▁MÙNG 866
868
+ ND 867
869
+ Ợ 868
870
+ ▁CĂN 869
871
+ ▁VIDEO 870
872
+ ▁CỜ 871
873
+ Ự 872
874
+ ▁TƯỞNG 873
875
+ ▁DẦU 874
876
+ ▁ĐẢM 875
877
+ ▁ÁO 876
878
+ Ề 877
879
+ ▁HÃNG 878
880
+ ▁TÙ 879
881
+ ▁QUAY 880
882
+ TER 881
883
+ ▁DỄ 882
884
+ ▁Z 883
885
+ SE 884
886
+ ▁LỆ 885
887
+ ▁DÀNH 886
888
+ ▁LE 887
889
+ ▁LẠ 888
890
+ ▁MÔ 889
891
+ ▁ĐÊM 890
892
+ ▁NGUY 891
893
+ ▁QUẬN 892
894
+ ▁XEN 893
895
+ ▁TỎ 894
896
+ ▁LẠC 895
897
+ Ổ 896
898
+ ▁MO 897
899
+ ▁ĐÔI 898
900
+ ▁HIỆP 899
901
+ ▁KỶ 900
902
+ ▁PA 901
903
+ IL 902
904
+ SA 903
905
+ Ẩ 904
906
+ ▁TÊ 905
907
+ ▁LỬA 906
908
+ ▁BUỔI 907
909
+ ▁ĐẦY 908
910
+ ▁KỸ 909
911
+ ▁& 910
912
+ ▁HU 911
913
+ ▁MỒNG 912
914
+ ▁CỤC 913
915
+ ▁NGÔI 914
916
+ ▁DỤC 915
917
+ Ỗ 916
918
+ ▁LÊ 917
919
+ ▁THỬ 918
920
+ ▁NGỜ 919
921
+ Ặ 920
922
+ ▁Ờ 921
923
+ ▁RỘNG 922
924
+ ▁KHĂN 923
925
+ Ủ 924
926
+ ▁TRỜI 925
927
+ ▁SOÁT 926
928
+ ▁MÓN 927
929
+ ▁NI 928
930
+ Ỉ 929
931
+ ▁NGỌC 930
932
+ ME 931
933
+ ▁HI 932
934
+ ▁LONG 933
935
+ ▁TUYẾN 934
936
+ ▁LÂU 935
937
+ ▁CƯỜNG 936
938
+ ▁MAI 937
939
+ ▁XUÂN 938
940
+ ▁THẢO 939
941
+ GE 940
942
+ È 941
943
+ ▁THÚC 942
944
+ ▁THIÊN 943
945
+ ▁KHO 944
946
+ ▁PHÚC 945
947
+ ▁TRÀ 946
948
+ ▁ÉT 947
949
+ ▁ĐÀI 948
950
+ ▁THUỐC 949
951
+ ▁TỘI 950
952
+ ▁NIÊN 951
953
+ ▁CHUYẾN 952
954
+ ▁ĐẮP 953
955
+ OL 954
956
+ ▁CHỖ 955
957
+ ▁GÓP 956
958
+ ▁MẤY 957
959
+ ▁ĐẢNG 958
960
+ ▁QUÁN 959
961
+ ▁VAI 960
962
+ ▁THIẾU 961
963
+ ▁TRI 962
964
+ Ũ 963
965
+ ▁SIÊU 964
966
+ ▁GIAI 965
967
+ ▁KHẲNG 966
968
+ ▁THIỆN 967
969
+ ▁TOÁN 968
970
+ ▁TÒA 969
971
+ ▁TRAO 970
972
+ ▁KÉP 971
973
+ ▁JO 972
974
+ ▁TỈ 973
975
+ ▁THẦY 974
976
+ ▁ÂU 975
977
+ ▁CHỊU 976
978
+ ▁AL 977
979
+ ▁PHÚ 978
980
+ ▁TÁ 979
981
+ ▁LÁ 980
982
+ KI 981
983
+ ▁CHẤP 982
984
+ ▁ĐÀ 983
985
+ ▁CẬU 984
986
+ Ẫ 985
987
+ ▁SỜ 986
988
+ ▁KIẾM 987
989
+ ▁NỀN 988
990
+ ▁HÃY 989
991
+ ▁VƯỢT 990
992
+ ▁ƠI 991
993
+ ▁ĐẨY 992
994
+ ▁CAN 993
995
+ ▁CHẲNG 994
996
+ ▁XÚC 995
997
+ ▁ĐỜ 996
998
+ ▁DÊ 997
999
+ ▁PHỐI 998
1000
+ ▁THỦY 999
1001
+ ▁TRIỀU 1000
1002
+ Ẹ 1001
1003
+ ▁LU 1002
1004
+ ▁KÉO 1003
1005
+ Ỏ 1004
1006
+ ▁TRỤ 1005
1007
+ ▁CÀ 1006
1008
+ ▁MÔI 1007
1009
+ ▁SƠ 1008
1010
+ ▁XONG 1009
1011
+ ▁KHỞI 1010
1012
+ ▁LAI 1011
1013
+ ▁LIU 1012
1014
+ VE 1013
1015
+ SI 1014
1016
+ ▁LĨNH 1015
1017
+ ▁VIẾT 1016
1018
+ ▁KHỦNG 1017
1019
+ ▁THĂM 1018
1020
+ ▁PỜ 1019
1021
+ ▁PÊ 1020
1022
+ ▁NGỒI 1021
1023
+ ▁LỚP 1022
1024
+ GA 1023
1025
+ ▁KHỎE 1024
1026
+ ▁XỜ 1025
1027
+ ▁NHỜ 1026
1028
+ ▁PHẠT 1027
1029
+ ▁BẠC 1028
1030
+ SH 1029
1031
+ ▁HÔN 1030
1032
+ ▁TÂN 1031
1033
+ ▁NEW 1032
1034
+ ▁HƯƠNG 1033
1035
+ BI 1034
1036
+ ▁VÂNG 1035
1037
+ ▁HIỂM 1036
1038
+ ▁QUỜ 1037
1039
+ ▁LẮM 1038
1040
+ VA 1039
1041
+ ▁QUANG 1040
1042
+ ▁TAI 1041
1043
+ ▁BẢNG 1042
1044
+ ▁HỒNG 1043
1045
+ ▁ƠN 1044
1046
+ ▁CÚ 1045
1047
+ ▁NỖ 1046
1048
+ ▁MỘ 1047
1049
+ ▁MỐI 1048
1050
+ ▁KÍCH 1049
1051
+ ▁BO 1050
1052
+ ▁BẦU 1051
1053
+ ÁN 1052
1054
+ ▁BUỘC 1053
1055
+ ▁NẶNG 1054
1056
+ ▁COI 1055
1057
+ ▁MU 1056
1058
+ ▁NÂNG 1057
1059
+ ▁BỨC 1058
1060
+ ▁HẠI 1059
1061
+ ▁HỌP 1060
1062
+ ▁DÒNG 1061
1063
+ ▁UỐNG 1062
1064
+ ▁SỢ 1063
1065
+ ▁THÚ 1064
1066
+ ▁BE 1065
1067
+ ▁THÍ 1066
1068
+ ▁JA 1067
1069
+ ▁MONG 1068
1070
+ ▁PHIẾU 1069
1071
+ Ẻ 1070
1072
+ ▁SYRIA 1071
1073
+ Ờ 1072
1074
+ ▁MIỀN 1073
1075
+ ▁MAR 1074
1076
+ ▁HẠT 1075
1077
+ ▁GIẤY 1076
1078
+ ▁THẤT 1077
1079
+ ƯƠNG 1078
1080
+ ▁VẺ 1079
1081
+ ▁SUẤT 1080
1082
+ ▁HÚT 1081
1083
+ ▁KA 1082
1084
+ ▁KHÁN 1083
1085
+ ▁NO 1084
1086
+ ▁SAI 1085
1087
+ BO 1086
1088
+ ▁BÁNH 1087
1089
+ ▁TRUMP 1088
1090
+ Ị 1089
1091
+ ▁SỚM 1090
1092
+ ▁CẬP 1091
1093
+ NO 1092
1094
+ ▁MẬT 1093
1095
+ ▁HẢ 1094
1096
+ ▁MÀY 1095
1097
+ ▁KIA 1096
1098
+ ▁SÂU 1097
1099
+ ▁CHÁU 1098
1100
+ ▁YÊN 1099
1101
+ IS 1100
1102
+ ▁TÍN 1101
1103
+ ▁KHỔ 1102
1104
+ KA 1103
1105
+ ▁XUYÊN 1104
1106
+ ▁THIỆT 1105
1107
+ ▁THỤ 1106
1108
+ ▁THE 1107
1109
+ ▁BỔ 1108
1110
+ ▁TỐC 1109
1111
+ ▁MỜI 1110
1112
+ ▁VA 1111
1113
+ ▁TRẮNG 1112
1114
+ ▁CLIP 1113
1115
+ ▁CHỜ 1114
1116
+ ▁GIÀNH 1115
1117
+ 0 1116
1118
+ ▁TE 1117
1119
+ DO 1118
1120
+ ▁CHÁY 1119
1121
+ ▁ĐỎ 1120
1122
+ ▁SONG 1121
1123
+ ▁ỔN 1122
1124
+ ▁HE 1123
1125
+ KE 1124
1126
+ ING 1125
1127
+ ▁THỔ 1126
1128
+ ▁CẢI 1127
1129
+ ▁THẬM 1128
1130
+ ▁PHỔ 1129
1131
+ ▁TRÌ 1130
1132
+ ▁THUẾ 1131
1133
+ ▁NHU 1132
1134
+ FF 1133
1135
+ ▁MÔN 1134
1136
+ ▁NHIỄM 1135
1137
+ UL 1136
1138
+ ▁THẤP 1137
1139
+ ▁XANH 1138
1140
+ RY 1139
1141
+ ▁PHÙ 1140
1142
+ AD 1141
1143
+ ▁LƯƠNG 1142
1144
+ ▁TẠM 1143
1145
+ ▁ĐAU 1144
1146
+ ▁MẮC 1145
1147
+ 1 1146
1148
+ ▁HẠNG 1147
1149
+ ▁LY 1148
1150
+ ▁NHÁ 1149
1151
+ ▁SI 1150
1152
+ Q 1151
1153
+ YA 1152
1154
+ ▁MAY 1153
1155
+ ▁GIANG 1154
1156
+ KO 1155
1157
+ ▁CHÀO 1156
1158
+ ▁KIỂU 1157
1159
+ ▁NGHIÊM 1158
1160
+ ENT 1159
1161
+ ▁THƠ 1160
1162
+ ▁MÀN 1161
1163
+ ▁GAM 1162
1164
+ ▁PHƯỜNG 1163
1165
+ ▁MAN 1164
1166
+ ▁TIM 1165
1167
+ ▁THƯỞNG 1166
1168
+ ▁CHỤP 1167
1169
+ ▁SUY 1168
1170
+ ▁NGHỈ 1169
1171
+ ▁DỤ 1170
1172
+ ▁DẤU 1171
1173
+ ▁CẦM 1172
1174
+ ▁VÀI 1173
1175
+ ED 1174
1176
+ ▁ME 1175
1177
+ ▁SÔNG 1176
1178
+ ▁DƯ 1177
1179
+ ▁CHIẾM 1178
1180
+ ▁THẲNG 1179
1181
+ Ĩ 1180
1182
+ ▁KÍ 1181
1183
+ ▁CAM 1182
1184
+ ▁TIỆN 1183
1185
+ ▁DE 1184
1186
+ ▁XẾP 1185
1187
+ ▁TẦNG 1186
1188
+ ▁HƠI 1187
1189
+ ▁NỐI 1188
1190
+ ▁ĐÀM 1189
1191
+ ▁LÍT 1190
1192
+ ▁CÁNH 1191
1193
+ ▁QUANH 1192
1194
+ ▁LỖI 1193
1195
+ RU 1194
1196
+ ▁QUEN 1195
1197
+ ▁LƯỢT 1196
1198
+ ARD 1197
1199
+ 2 1198
1200
+ ▁RÚT 1199
1201
+ ▁THỎA 1200
1202
+ ▁THAO 1201
1203
+ ▁TRẢI 1202
1204
+ ▁ĐỌC 1203
1205
+ MO 1204
1206
+ ▁SẴN 1205
1207
+ ▁NGỦ 1206
1208
+ ▁MÁU 1207
1209
+ ▁THẺ 1208
1210
+ ▁LÁI 1209
1211
+ ▁NÓNG 1210
1212
+ ▁BINH 1211
1213
+ ▁LOẠT 1212
1214
+ ▁KHÓA 1213
1215
+ SHI 1214
1216
+ ▁LÂM 1215
1217
+ ▁ƯỚC 1216
1218
+ ▁NHIỆT 1217
1219
+ ▁THƯỢNG 1218
1220
+ ▁ĐỔ 1219
1221
+ ▁FACEBOOK 1220
1222
+ ▁PE 1221
1223
+ Ẽ 1222
1224
+ ▁ÁNH 1223
1225
+ ▁SẮP 1224
1226
+ ▁QUẦN 1225
1227
+ ▁CHÚT 1226
1228
+ ▁TẦM 1227
1229
+ PA 1228
1230
+ ▁NUÔI 1229
1231
+ ▁TRUY 1230
1232
+ ▁HÙNG 1231
1233
+ ▁PHÊ 1232
1234
+ ▁NGHỀ 1233
1235
+ ▁WE 1234
1236
+ ▁LẼ 1235
1237
+ ▁PO 1236
1238
+ ▁GAME 1237
1239
+ ▁HẠNH 1238
1240
+ WA 1239
1241
+ > 1240
1242
+ ▁ĐÁP 1241
1243
+ ▁CẬN 1242
1244
+ PE 1243
1245
+ BER 1244
1246
+ ▁KHẮC 1245
1247
+ ▁ĐỪNG 1246
1248
+ ▁TỤ 1247
1249
+ ▁HỜ 1248
1250
+ ▁CÁN 1249
1251
+ ▁BIỆN 1250
1252
+ ƯỚC 1251
1253
+ ▁TIỂU 1252
1254
+ ▁ĐỨA 1253
1255
+ ▁ĐEN 1254
1256
+ ▁TẾT 1255
1257
+ ▁LỆNH 1256
1258
+ ▁LỰA 1257
1259
+ ▁SUỐT 1258
1260
+ ▁ỦNG 1259
1261
+ ▁CHỨA 1260
1262
+ ▁BÀY 1261
1263
+ ▁THÙ 1262
1264
+ ▁CẮT 1263
1265
+ ▁KẺ 1264
1266
+ ▁GIÀ 1265
1267
+ Ễ 1266
1268
+ ▁TRƯƠNG 1267
1269
+ ▁NIỆM 1268
1270
+ PH 1269
1271
+ ▁CHẮN 1270
1272
+ ONE 1271
1273
+ ▁NHẤN 1272
1274
+ ▁HẮT 1273
1275
+ ▁TUẤN 1274
1276
+ ▁BÁ 1275
1277
+ ▁VE 1276
1278
+ ▁SÓNG 1277
1279
+ ▁NỔ 1278
1280
+ ▁ĐỘT 1279
1281
+ ▁ĐƯƠNG 1280
1282
+ ▁GIÁC 1281
1283
+ INE 1282
1284
+ ▁THỪA 1283
1285
+ ▁CUP 1284
1286
+ ▁CHĂM 1285
1287
+ ▁VONG 1286
1288
+ ▁KÊU 1287
1289
+ VN 1288
1290
+ ▁ƯU 1289
1291
+ ▁TAO 1290
1292
+ ▁TẢ 1291
1293
+ ▁TRÁNH 1292
1294
+ ▁TÚ 1293
1295
+ ▁SÚNG 1294
1296
+ ▁NHẸ 1295
1297
+ ▁THÔN 1296
1298
+ ▁TÁI 1297
1299
+ ▁XUNG 1298
1300
+ ▁NỢ 1299
1301
+ ▁RE 1300
1302
+ ▁PHÁN 1301
1303
+ ▁HÉC 1302
1304
+ ▁KHÁM 1303
1305
+ BE 1304
1306
+ ▁CHỮ 1305
1307
+ SON 1306
1308
+ ▁SỨ 1307
1309
+ ▁DẠNG 1308
1310
+ ▁INTERNET 1309
1311
+ ▁CỰU 1310
1312
+ ▁DƯỠNG 1311
1313
+ ▁VINH 1312
1314
+ ▁IRAN 1313
1315
+ TON 1314
1316
+ ▁IS 1315
1317
+ ▁CÂN 1316
1318
+ ▁HỌA 1317
1319
+ UNK 1318
1320
+ ▁RƠI 1319
1321
+ ▁PHA 1320
1322
+ ▁CHỮA 1321
1323
+ ▁ĐỊCH 1322
1324
+ ▁LỤC 1323
1325
+ ▁QUÊ 1324
1326
+ ▁THỊT 1325
1327
+ ▁MƯA 1326
1328
+ ▁TẶNG 1327
1329
+ ▁CŨ 1328
1330
+ ▁LƯỢC 1329
1331
+ ▁TUYỆT 1330
1332
+ ▁PHAN 1331
1333
+ ▁CUỐN 1332
1334
+ MAN 1333
1335
+ ▁NGẠI 1334
1336
+ ▁DỪNG 1335
1337
+ ▁DŨNG 1336
1338
+ ▁BẮN 1337
1339
+ ▁RI 1338
1340
+ ▁THIỆU 1339
1341
+ ▁KHÁNH 1340
1342
+ ▁NẴNG 1341
1343
+ ▁KÍNH 1342
1344
+ ▁NGĂN 1343
1345
+ ▁TẠ 1344
1346
+ ▁CHÓNG 1345
1347
+ ▁CHỈNH 1346
1348
+ ▁TỘC 1347
1349
+ ▁KHOÁN 1348
1350
+ ▁DÂY 1349
1351
+ ▁DỮ 1350
1352
+ ▁ƯƠNG 1351
1353
+ ▁DÕI 1352
1354
+ GO 1353
1355
+ ▁ĐÁM 1354
1356
+ ▁VÉ 1355
1357
+ ▁CHẶN 1356
1358
+ ▁TÚY 1357
1359
+ ▁CHỢ 1358
1360
+ ▁KHÚC 1359
1361
+ ▁NE 1360
1362
+ ▁TẠP 1361
1363
+ ▁GIẢN 1362
1364
+ ▁KE 1363
1365
+ ▁BẠI 1364
1366
+ ▁NHẮC 1365
1367
+ ▁SÀNG 1366
1368
+ ▁XỨ 1367
1369
+ Ể 1368
1370
+ ▁CHỞ 1369
1371
+ ▁UKRAINE 1370
1372
+ ▁XU 1371
1373
+ ▁MỪNG 1372
1374
+ ▁TÔN 1373
1375
+ ▁HẤP 1374
1376
+ ▁DẦN 1375
1377
+ ▁TẬN 1376
1378
+ ▁JU 1377
1379
+ ▁KHẢO 1378
1380
+ ▁BĂNG 1379
1381
+ ▁TỆ 1380
1382
+ ▁SỸ 1381
1383
+ ▁KHÔ 1382
1384
+ ▁GO 1383
1385
+ ▁JE 1384
1386
+ ▁NGÔN 1385
1387
+ ▁NHẮN 1386
1388
+ ▁PHẬN 1387
1389
+ ▁BẬT 1388
1390
+ ▁DỊP 1389
1391
+ ▁GẮNG 1390
1392
+ ▁FAN 1391
1393
+ ▁YẾN 1392
1394
+ ▁TẮC 1393
1395
+ ▁RỜI 1394
1396
+ ▁GẮN 1395
1397
+ ▁MỎ 1396
1398
+ ▁THUÊ 1397
1399
+ Đ 1398
1400
+ ▁VƯƠNG 1399
1401
+ ▁CẶP 1400
1402
+ ▁BUỒN 1401
1403
+ ▁XẤU 1402
1404
+ ▁ĐỢI 1403
1405
+ ▁WA 1404
1406
+ ▁Q 1405
1407
+ ▁QUÊN 1406
1408
+ Ừ 1407
1409
+ ▁TRẤN 1408
1410
+ ▁NÈ 1409
1411
+ ▁SÀI 1410
1412
+ ▁CẤM 1411
1413
+ ▁NÚI 1412
1414
+ ▁NGẮN 1413
1415
+ LAND 1414
1416
+ ▁THẨM 1415
1417
+ ▁CƯỜI 1416
1418
+ ▁GIÀU 1417
1419
+ ▁BEN 1418
1420
+ ▁GỐC 1419
1421
+ ▁TỒN 1420
1422
+ ▁SUNG 1421
1423
+ ▁SÓC 1422
1424
+ ▁RÀNG 1423
1425
+ ▁PHẬT 1424
1426
+ ▁THÁC 1425
1427
+ ▁BÓ 1426
1428
+ ▁NGƯỢC 1427
1429
+ ▁THOÁT 1428
1430
+ ZA 1429
1431
+ ▁SỬA 1430
1432
+ BANK 1431
1433
+ ▁NGON 1432
1434
+ ▁ĐOÁN 1433
1435
+ VER 1434
1436
+ ▁PHE 1435
1437
+ ▁FA 1436
1438
+ ▁Ừ 1437
1439
+ ▁NIỀM 1438
1440
+ ▁LIỀN 1439
1441
+ ▁VAY 1440
1442
+ ▁RỪNG 1441
1443
+ ▁IPHONE 1442
1444
+ ▁ĐÍCH 1443
1445
+ ▁VÂN 1444
1446
+ FI 1445
1447
+ LLA 1446
1448
+ SK 1447
1449
+ ▁QUỸ 1448
1450
+ ▁DẠY 1449
1451
+ ▁KÊNH 1450
1452
+ ▁HẦU 1451
1453
+ Ằ 1452
1454
+ ▁LẠNH 1453
1455
+ ▁GE 1454
1456
+ ▁NHIÊU 1455
1457
+ ▁GÒN 1456
1458
+ ▁THUA 1457
1459
+ ▁MALAYSIA 1458
1460
+ FA 1459
1461
+ ▁CHẶT 1460
1462
+ ▁HẸN 1461
1463
+ ▁GÀ 1462
1464
+ ▁NGÃ 1463
1465
+ ▁CHÀNG 1464
1466
+ ▁TÓC 1465
1467
+ ▁XÔ 1466
1468
+ ▁HƯNG 1467
1469
+ ▁VIETNAM 1468
1470
+ ▁ĐEM 1469
1471
+ ▁HỦY 1470
1472
+ ▁TẤM 1471
1473
+ ▁TRỐN 1472
1474
+ ▁KÉM 1473
1475
+ ▁MON 1474
1476
+ ▁CƯỚI 1475
1477
+ ▁ĐỈNH 1476
1478
+ ▁NẮM 1477
1479
+ ▁VÕ 1478
1480
+ ▁INDONESIA 1479
1481
+ ▁BÁT 1480
1482
+ ▁Ơ 1481
1483
+ ▁NỬA 1482
1484
+ ▁KỊP 1483
1485
+ ▁BÈ 1484
1486
+ ▁BÃO 1485
1487
+ ▁BOM 1486
1488
+ ▁CHỤC 1487
1489
+ ▁PHILIPPINES 1488
1490
+ DER 1489
1491
+ ▁ĐỢT 1490
1492
+ ▁ONLINE 1491
1493
+ ▁THUYẾT 1492
1494
+ ▁NHÉ 1493
1495
+ Õ 1494
1496
+ ▁NÔ 1495
1497
+ ▁XĂNG 1496
1498
+ ▁CĂNG 1497
1499
+ ▁SỮA 1498
1500
+ ▁VĨNH 1499
1501
+ ▁NGHÈO 1500
1502
+ ▁GIÓ 1501
1503
+ ▁VIRUS 1502
1504
+ ▁LÃI 1503
1505
+ ▁ASEAN 1504
1506
+ ▁ĐỠ 1505
1507
+ ▁BUÔN 1506
1508
+ ▁VỮNG 1507
1509
+ ▁PARK 1508
1510
+ ▁LẮNG 1509
1511
+ ▁BỮA 1510
1512
+ ▁THƯA 1511
1513
+ ▁SẠCH 1512
1514
+ ▁MÁI 1513
1515
+ ▁WORLD 1514
1516
+ ▁CHE 1515
1517
+ ▁HÂM 1516
1518
+ ▁QUÀ 1517
1519
+ ▁HÈ 1518
1520
+ ▁KHUYẾN 1519
1521
+ ▁EURO 1520
1522
+ ▁GIẾT 1521
1523
+ ▁KÊ 1522
1524
+ ▁SÀN 1523
1525
+ ▁NGƯ 1524
1526
+ ▁LIỆT 1525
1527
+ ▁KHA 1526
1528
+ ▁MIỄN 1527
1529
+ ▁KIÊN 1528
1530
+ ▁KHIỂN 1529
1531
+ ▁TRỒNG 1530
1532
+ ▁GƯƠNG 1531
1533
+ ▁NGỪNG 1532
1534
+ ▁THĂNG 1533
1535
+ ▁CHIẾU 1534
1536
+ ▁TÚI 1535
1537
+ ▁KHẮP 1536
1538
+ ▁MẼ 1537
1539
+ ▁MƠ 1538
1540
+ ▁TRƯNG 1539
1541
+ ▁TĨNH 1540
1542
+ ▁CƯỚP 1541
1543
+ ▁REUTERS 1542
1544
+ ▁KỊCH 1543
1545
+ ▁CẤU 1544
1546
+ ▁DÀNG 1545
1547
+ ▁NÀNG 1546
1548
+ ▁THAI 1547
1549
+ ▁KÌ 1548
1550
+ ▁ĐỖ 1549
1551
+ ▁THÁCH 1550
1552
+ ▁HỀ 1551
1553
+ ▁SINGAPORE 1552
1554
+ 3 1553
1555
+ ▁APPLE 1554
1556
+ ▁GÓC 1555
1557
+ ▁NGỤ 1556
1558
+ ▁GÓI 1557
1559
+ ▁CHÓ 1558
1560
+ ▁DẬY 1559
1561
+ LD 1560
1562
+ ▁DỊ 1561
1563
+ ▁NÊU 1562
1564
+ ▁CHẤN 1563
1565
+ ▁NGUYỆN 1564
1566
+ ▁LŨ 1565
1567
+ ▁CHẠM 1566
1568
+ ▁ĐÒI 1567
1569
+ ▁LEAGUE 1568
1570
+ ▁DỌA 1569
1571
+ ▁GẤP 1570
1572
+ ▁DÁNG 1571
1573
+ ▁KHUÔN 1572
1574
+ ▁GIỌNG 1573
1575
+ ▁ĐIỂN 1574
1576
+ ▁MỀM 1575
1577
+ ▁MẠCH 1576
1578
+ ▁Ư 1577
1579
+ ▁SẠN 1578
1580
+ ▁LƯỚI 1579
1581
+ IÊN 1580
1582
+ ▁RƯỢU 1581
1583
+ ▁ĐUA 1582
1584
+ ▁CAMERA 1583
1585
+ ▁ĐÈN 1584
1586
+ ▁HOẢNG 1585
1587
+ ▁ĐẠN 1586
1588
+ ▁LOÀI 1587
1589
+ ▁CAMPUCHIA 1588
1590
+ ▁TRÙNG 1589
1591
+ ▁MẮN 1590
1592
+ ▁THẬP 1591
1593
+ ▁HƯ 1592
1594
+ ▁XẾ 1593
1595
+ ▁LỒ 1594
1596
+ ▁AUSTRALIA 1595
1597
+ ▁SẮT 1596
1598
+ ▁NHĨ 1597
1599
+ ▁PHƯỚC 1598
1600
+ ▁NGOÁI 1599
1601
+ ▁BÃI 1600
1602
+ ▁NGỮ 1601
1603
+ ▁TÍ 1602
1604
+ ▁ĐUỔI 1603
1605
+ ▁< 1604
1606
+ ▁NGẠC 1605
1607
+ ▁TƯƠI 1606
1608
+ ▁FOR 1607
1609
+ ▁LẪN 1608
1610
+ ▁REAL 1609
1611
+ ▁ẨN 1610
1612
+ ▁THẰNG 1611
1613
+ ▁TIÊM 1612
1614
+ ▁DONALD 1613
1615
+ ▁KHẨN 1614
1616
+ ▁BẠO 1615
1617
+ ▁XƯA 1616
1618
+ ▁LỐI 1617
1619
+ ▁ISRAEL 1618
1620
+ ▁TRỘM 1619
1621
+ ▁GỠ 1620
1622
+ ▁DUYÊN 1621
1623
+ ▁GHẾ 1622
1624
+ Ử 1623
1625
+ ▁MẠC 1624
1626
+ 5 1625
1627
+ Ý 1626
1628
+ Ỷ 1627
1629
+ 4 1628
1630
+ : 1629
1631
+ 9 1630
1632
+ Ỵ 1631
1633
+ 7 1632
1634
+ 8 1633
1635
+ 6 1634
1636
+ Ữ 1635
1637
+ Ỳ 1636
1638
+ Ẳ 1637
1639
+ , 1638
1640
+ _ 1639
1641
+ Ỹ 1640
1642
+ Ẵ 1641
1643
+ @ 1642
1644
+ % 1643
1645
+ ' 1644
1646
+ & 1645
1647
+ $ 1646
1648
+ ˈ 1647
1649
+ ° 1648
1650
+ Ə 1649
1651
+ Ɪ 1650
1652
+ < 1651
1653
+ า 1652
1654
+ " 1653
1655
+ = 1654
1656
+ Ë 1655
1657
+ Ā 1656
1658
+ น 1657
1659
+ Ö 1658
1660
+ Æ 1659
1661
+ ! 1660
1662
+ Ï 1661
1663
+ А 1662
1664
+ ม 1663
1665
+ Е 1664
1666
+ ่ 1665
1667
+ ้ 1666
1668
+ – 1667
1669
+ ร 1668
1670
+ Н 1669
1671
+ + 1670
1672
+ ː 1671
1673
+ Ü 1672
1674
+ И 1673
1675
+ ย 1674
1676
+ Î 1675
1677
+ ั 1676
1678
+ ิ 1677
1679
+ ง 1678
1680
+ ต 1679
1681
+ Ʃ 1680
1682
+ ก 1681
1683
+ К 1682
1684
+ Л 1683
1685
+ Ɡ 1684
1686
+ Ī 1685
1687
+ Ɔ 1686
1688
+ Р 1687
1689
+ เ 1688
1690
+ อ 1689
1691
+ ห 1690
1692
+ О 1691
1693
+ จ 1692
1694
+ В 1693
1695
+ ี 1694
1696
+ С 1695
1697
+ ว 1696
1698
+ บ 1697
1699
+ Ō 1698
1700
+ Ő 1699
1701
+ Θ 1700
1702
+ ด 1701
1703
+ Š 1702
1704
+ Ä 1703
1705
+ Ʌ 1704
1706
+ Т 1705
1707
+ М 1706
1708
+ ไ 1707
1709
+ Ŋ 1708
1710
+ ɘ 1709
1711
+ Α 1710
1712
+ Β 1711
1713
+ ท 1712
1714
+ Ɑ 1713
1715
+ \ 1714
1716
+ ` 1715
1717
+ Č 1716
1718
+ Д 1717
1719
+ ค 1718
1720
+ * 1719
1721
+ × 1720
1722
+ Ø 1721
1723
+ ɚ 1722
1724
+ ล 1723
1725
+ Я 1724
1726
+ ا 1725
1727
+ ะ 1726
1728
+ ل 1727
1729
+ ي 1728
1730
+ Й 1729
1731
+ У 1730
1732
+ ป 1731
1733
+ ์ 1732
1734
+ Г 1733
1735
+ Ǐ 1734
1736
+ ˌ 1735
1737
+ − 1736
1738
+ พ 1737
1739
+ ข 1738
1740
+ ฟ 1739
1741
+ Ɦ 1740
1742
+ ุ 1741
1743
+ ส 1742
1744
+ Б 1743
1745
+ ن 1744
1746
+ ; 1745
1747
+ } 1746
1748
+ Û 1747
1749
+ Ɒ 1748
1750
+ Ɜ 1749
1751
+ ช 1750
1752
+ | 1751
1753
+ ­ 1752
1754
+ Ě 1753
1755
+ Ǒ 1754
1756
+ َ 1755
1757
+ ب 1756
1758
+ 所 1757
1759
+ ه 1758
1760
+ Μ 1759
1761
+ Ч 1760
1762
+ ر 1761
1763
+ ธ 1762
1764
+ 🎵 1763
1765
+ П 1764
1766
+ ہ 1765
1767
+ ภ 1766
1768
+ و 1767
1769
+ Ş 1768
1770
+ 你 1769
1771
+ 的 1770
1772
+ Ğ 1771
1773
+ Ό 1772
1774
+ Π 1773
1775
+ Ω 1774
1776
+ Ь 1775
1777
+ ถ 1776
1778
+ ผ 1777
1779
+ ึ 1778
1780
+ 没 1779
1781
+ 超 1780
1782
+ 還 1781
1783
+ ́ 1782
1784
+ โ 1783
1785
+ ณ 1784
1786
+ Ი 1785
1787
+ З 1786
1788
+ ت 1787
1789
+ ـ 1788
1790
+ Ū 1789
1791
+ ฮ 1790
1792
+ 有 1791
1793
+ « 1792
1794
+ ± 1793
1795
+ » 1794
1796
+ Å 1795
1797
+ Ƙ 1796
1798
+ Ǔ 1797
1799
+ ɝ 1798
1800
+ ɳ 1799
1801
+ ̀ 1800
1802
+ ̉ 1801
1803
+ ̣ 1802
1804
+ ج 1803
1805
+ س 1804
1806
+ م 1805
1807
+ ู 1806
1808
+ ็ 1807
1809
+ ី 1808
1810
+ Ḅ 1809
1811
+ — 1810
1812
+ • 1811
1813
+ ′ 1812
1814
+ ⃣ 1813
1815
+ ⊙ 1814
1816
+ ⋆ 1815
1817
+ 以 1816
1818
+ 可 1817
1819
+ 炒 1818
1820
+ 秦 1819
1821
+ 몰 1820
1822
+ 소 1821
1823
+ 참 1822
1824
+ 취 1823
1825
+ ️ 1824
1826
+ 💕 1825
1827
+ 🤣 1826
1828
+ Ł 1827
1829
+ ¿ 1828
1830
+ ش 1829
1831
+ 们 1830
1832
+ Ʂ 1831
1833
+ 不 1832
1834
+ 国 1833
1835
+ 美 1834
1836
+ 轻 1835
1837
+ 能 1836
1838
+ Ვ 1837
1839
+ 沒 1838
1840
+ 果 1839
1841
+ 如 1840
1842
+ 咱 1841
1843
+ 務 1842
1844
+ 任 1843
1845
+ ♥ 1844
1846
+ Ლ 1845
1847
+ ฤ 1846
1848
+ ک 1847
1849
+ Ы 1848
1850
+ Ш 1849
1851
+ Γ 1850
1852
+ ̄ 1851
1853
+ ❤ 1852
1854
+ ّ 1853
1855
+ ُ 1854
1856
+ ع 1855
1857
+ Ю 1856
1858
+ ɾ 1857
1859
+ ⌒ 1858
1860
+ ษ 1859
1861
+ ศ 1860
1862
+ Х 1861
1863
+ ʤ 1862
1864
+ ⁄ 1863
1865
+ แ 1864
1866
+ Λ 1865
1867
+ ᄒ 1866
1868
+ Ć 1867
1869
+ { 1868
1870
+ ̬ 1869
1871
+ Ʒ 1870
1872
+ ื 1871
1873
+ Ð 1872
1874
+ ใ 1873
1875
+ Ǎ 1874
1876
+ ํ 1875
1877
+ Ñ 1876
1878
+ ̆ 1877
1879
+ Ʊ 1878
1880
+ Œ 1879
1881
+ ̂ 1880
1882
+ Ç 1881
1883
+ ق 1882
1884
+ ً 1883
1885
+ Ś 1884
1886
+ ʻ 1885
1887
+ ز 1886
1888
+ 丁 1887
1889
+ 为 1888
1890
+ 卻 1889
1891
+ 拍 1890
1892
+ 腐 1891
1893
+ 花 1892
1894
+ ^ 1893
1895
+ o 1894
1896
+ Þ 1895
1897
+ Ň 1896
1898
+ Ɗ 1897
1899
+ Ƣ 1898
1900
+ Ǹ 1899
1901
+ ʔ 1900
1902
+ ʕ 1901
1903
+ Δ 1902
1904
+ Ρ 1903
1905
+ Ё 1904
1906
+ Ѵ 1905
1907
+ آ 1906
1908
+ ئ 1907
1909
+ ث 1908
1910
+ ح 1909
1911
+ ى 1910
1912
+ ْ 1911
1913
+ ٰ 1912
1914
+ ٹ 1913
1915
+ ڡ 1914
1916
+ ۉ 1915
1917
+ ی 1916
1918
+ ے 1917
1919
+ ฐ 1918
1920
+ ฬ 1919
1921
+ ๋ 1920
1922
+ ភ 1921
1923
+ ម 1922
1924
+ យ 1923
1925
+ រ 1924
1926
+ ស 1925
1927
+ ឡ 1926
1928
+ ា 1927
1929
+ ្ 1928
1930
+ Ქ 1929
1931
+ Ṇ 1930
1932
+ Ἰ 1931
1933
+ Ὶ 1932
1934
+ ∇ 1933
1935
+ ≥ 1934
1936
+ ≦ 1935
1937
+ ≧ 1936
1938
+ ♛ 1937
1939
+ ♡ 1938
1940
+ ✪ 1939
1941
+ ❖ 1940
1942
+ 『 1941
1943
+ 』 1942
1944
+ 中 1943
1945
+ 丹 1944
1946
+ 丽 1945
1947
+ 么 1946
1948
+ 享 1947
1949
+ 人 1948
1950
+ 什 1949
1951
+ 他 1950
1952
+ 会 1951
1953
+ 位 1952
1954
+ 其 1953
1955
+ 准 1954
1956
+ 几 1955
1957
+ 分 1956
1958
+ 到 1957
1959
+ 剣 1958
1960
+ 华 1959
1961
+ 協 1960
1962
+ 变 1961
1963
+ 哪 1962
1964
+ 單 1963
1965
+ 备 1964
1966
+ 外 1965
1967
+ 失 1966
1968
+ 察 1967
1969
+ 對 1968
1970
+ 小 1969
1971
+ 幾 1970
1972
+ 我 1971
1973
+ 手 1972
1974
+ 拿 1973
1975
+ 探 1974
1976
+ 敗 1975
1977
+ 方 1976
1978
+ 普 1977
1979
+ 朗 1978
1980
+ 样 1979
1981
+ 法 1980
1982
+ 滿 1981
1983
+ 版 1982
1984
+ 特 1983
1985
+ 白 1984
1986
+ 索 1985
1987
+ 组 1986
1988
+ 被 1987
1989
+ 警 1988
1990
+ 議 1989
1991
+ ‪ 1990
1992
+ د 1991
1993
+ Ṭ 1992
1994
+ ฝ 1993
1995
+ Ა 1994
1996
+ Ე 1995
1997
+ Თ 1996
1998
+ Რ 1997
1999
+ Შ 1998
2000
+ Ậ 1999
decode.py ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2022 Xiaomi Corp. (authors: Fangjun Kuang)
2
+ #
3
+ # Copied from https://github.com/k2-fsa/sherpa/blob/master/sherpa/bin/conformer_rnnt/decode.py
4
+ #
5
+ # See LICENSE for clarification regarding multiple authors
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ import math
20
+ from typing import List
21
+
22
+ import torch
23
+ from sherpa import RnntConformerModel, greedy_search, modified_beam_search
24
+ from torch.nn.utils.rnn import pad_sequence
25
+
26
+ LOG_EPS = math.log(1e-10)
27
+
28
+
29
+ @torch.no_grad()
30
+ def run_model_and_do_greedy_search(
31
+ model: RnntConformerModel,
32
+ features: List[torch.Tensor],
33
+ ) -> List[List[int]]:
34
+ """Run RNN-T model with the given features and use greedy search
35
+ to decode the output of the model.
36
+
37
+ Args:
38
+ model:
39
+ The RNN-T model.
40
+ features:
41
+ A list of 2-D tensors. Each entry is of shape
42
+ (num_frames, feature_dim).
43
+ Returns:
44
+ Return a list-of-list containing the decoding token IDs.
45
+ """
46
+ features_length = torch.tensor(
47
+ [f.size(0) for f in features],
48
+ dtype=torch.int64,
49
+ )
50
+ features = pad_sequence(
51
+ features,
52
+ batch_first=True,
53
+ padding_value=LOG_EPS,
54
+ )
55
+
56
+ device = model.device
57
+ features = features.to(device)
58
+ features_length = features_length.to(device)
59
+
60
+ encoder_out, encoder_out_length = model.encoder(
61
+ features=features,
62
+ features_length=features_length,
63
+ )
64
+
65
+ hyp_tokens = greedy_search(
66
+ model=model,
67
+ encoder_out=encoder_out,
68
+ encoder_out_length=encoder_out_length.cpu(),
69
+ )
70
+ return hyp_tokens
71
+
72
+
73
+ @torch.no_grad()
74
+ def run_model_and_do_modified_beam_search(
75
+ model: RnntConformerModel,
76
+ features: List[torch.Tensor],
77
+ num_active_paths: int,
78
+ ) -> List[List[int]]:
79
+ """Run RNN-T model with the given features and use greedy search
80
+ to decode the output of the model.
81
+
82
+ Args:
83
+ model:
84
+ The RNN-T model.
85
+ features:
86
+ A list of 2-D tensors. Each entry is of shape
87
+ (num_frames, feature_dim).
88
+ num_active_paths:
89
+ Used only when decoding_method is modified_beam_search.
90
+ It specifies number of active paths for each utterance. Due to
91
+ merging paths with identical token sequences, the actual number
92
+ may be less than "num_active_paths".
93
+ Returns:
94
+ Return a list-of-list containing the decoding token IDs.
95
+ """
96
+ features_length = torch.tensor(
97
+ [f.size(0) for f in features],
98
+ dtype=torch.int64,
99
+ )
100
+ features = pad_sequence(
101
+ features,
102
+ batch_first=True,
103
+ padding_value=LOG_EPS,
104
+ )
105
+
106
+ device = model.device
107
+ features = features.to(device)
108
+ features_length = features_length.to(device)
109
+
110
+ encoder_out, encoder_out_length = model.encoder(
111
+ features=features,
112
+ features_length=features_length,
113
+ )
114
+
115
+ hyp_tokens = modified_beam_search(
116
+ model=model,
117
+ encoder_out=encoder_out,
118
+ encoder_out_length=encoder_out_length.cpu(),
119
+ num_active_paths=num_active_paths,
120
+ )
121
+ return hyp_tokens
decoder-epoch-20-avg-10.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b491630c33e76146b7296ab68cee5ae3a8d572732d36a552ee231d4419e06d32
3
+ size 1308690
decoder-epoch-20-avg-10.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf2aa385b82c9d5d40cd29c3188af52d0249b3b78f0d4b7eb84ad502d50c7e7f
3
+ size 5165084
encoder-epoch-20-avg-10.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ef5286dd427eb108055c2ddc1982aa31e544706072d5ea228729292dacade68
3
+ size 27699063
encoder-epoch-20-avg-10.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0daa9842a1f39d146e57d6e951edc8910ddd234cbb00e9b5015a5280a5ba221
3
+ size 92184132
examples.py ADDED
@@ -0,0 +1,544 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ #
3
+ # Copyright 2022 Xiaomi Corp. (authors: Fangjun Kuang)
4
+ #
5
+ # See LICENSE for clarification regarding multiple authors
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ examples = [
19
+ [
20
+ "Chinese+English",
21
+ "csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20",
22
+ "greedy_search",
23
+ 4,
24
+ "Yes",
25
+ "./test_wavs/tal_csasr/0.wav",
26
+ ],
27
+ [
28
+ "Chinese+English+Cantonese",
29
+ "csukuangfj/sherpa-onnx-paraformer-trilingual-zh-cantonese-en",
30
+ "greedy_search",
31
+ 4,
32
+ "Yes",
33
+ "./test_wavs/cantonese/2.wav",
34
+ ],
35
+ [
36
+ "Chinese+English+Cantonese+Japanese+Korean",
37
+ "csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",
38
+ "greedy_search",
39
+ 4,
40
+ "Yes",
41
+ "./test_wavs/sense_voice/yue.wav",
42
+ ],
43
+ [
44
+ "Cantonese",
45
+ "zrjin/icefall-asr-mdcc-zipformer-2024-03-11",
46
+ "greedy_search",
47
+ 4,
48
+ "Yes",
49
+ "./test_wavs/cantonese/1.wav",
50
+ ],
51
+ [
52
+ "English",
53
+ "whisper-base.en",
54
+ "greedy_search",
55
+ 4,
56
+ "Yes",
57
+ "./test_wavs/librispeech/1089-134686-0001.wav",
58
+ ],
59
+ [
60
+ "Chinese",
61
+ "csukuangfj/sherpa-onnx-paraformer-zh-2024-03-09",
62
+ "greedy_search",
63
+ 4,
64
+ "Yes",
65
+ "./test_wavs/paraformer-zh/四川话.wav",
66
+ ],
67
+ [
68
+ "Japanese",
69
+ "reazon-research/reazonspeech-k2-v2",
70
+ "greedy_search",
71
+ 4,
72
+ "No",
73
+ "./test_wavs/japanese/1.wav",
74
+ ],
75
+ [
76
+ "Korean",
77
+ "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",
78
+ "greedy_search",
79
+ 4,
80
+ "No",
81
+ "./test_wavs/korean/0.wav",
82
+ ],
83
+ [
84
+ "Russian",
85
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-russian-2024-10-24",
86
+ "greedy_search",
87
+ 4,
88
+ "No",
89
+ "./test_wavs/russian/russian-i-love-you.wav",
90
+ ],
91
+ [
92
+ "Thai",
93
+ "yfyeung/icefall-asr-gigaspeech2-th-zipformer-2024-06-20",
94
+ "greedy_search",
95
+ 4,
96
+ "No",
97
+ "./test_wavs/thai/0.wav",
98
+ ],
99
+ # [
100
+ # "Russian",
101
+ # "alphacep/vosk-model-ru",
102
+ # "greedy_search",
103
+ # 4,
104
+ # "No",
105
+ # "./test_wavs/russian/test.wav",
106
+ # ],
107
+ # [
108
+ # "German",
109
+ # "csukuangfj/wav2vec2.0-torchaudio",
110
+ # "greedy_search",
111
+ # 4,
112
+ # "No",
113
+ # "./test_wavs/german/20170517-0900-PLENARY-16-de_20170517.wav",
114
+ # ],
115
+ # [
116
+ # "Arabic",
117
+ # "AmirHussein/icefall-asr-mgb2-conformer_ctc-2022-27-06",
118
+ # "greedy_search",
119
+ # 4,
120
+ # "No",
121
+ # "./test_wavs/arabic/a.wav",
122
+ # ],
123
+ # [
124
+ # "Tibetan",
125
+ # "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless7-2022-12-02",
126
+ # "greedy_search",
127
+ # 4,
128
+ # "No",
129
+ # "./test_wavs/tibetan/a_0_cacm-A70_31117.wav",
130
+ # ],
131
+ # [
132
+ # "French",
133
+ # "shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14",
134
+ # "greedy_search",
135
+ # 4,
136
+ # "No",
137
+ # "./test_wavs/french/common_voice_fr_19364697.wav",
138
+ # ],
139
+ # [
140
+ # "Chinese",
141
+ # "desh2608/icefall-asr-alimeeting-pruned-transducer-stateless7",
142
+ # "greedy_search",
143
+ # 4,
144
+ # "Yes",
145
+ # "./test_wavs/alimeeting/R8003_M8001-8004-165.wav",
146
+ # ],
147
+ # [
148
+ # "Chinese",
149
+ # "csukuangfj/sherpa-onnx-paraformer-zh-2024-03-09",
150
+ # "greedy_search",
151
+ # 4,
152
+ # "Yes",
153
+ # "./test_wavs/paraformer-zh/天津话.wav",
154
+ # ],
155
+ # [
156
+ # "Chinese",
157
+ # "csukuangfj/sherpa-onnx-paraformer-zh-2024-03-09",
158
+ # "greedy_search",
159
+ # 4,
160
+ # "Yes",
161
+ # "./test_wavs/paraformer-zh/郑州话.wav",
162
+ # ],
163
+ # [
164
+ # "Chinese",
165
+ # "desh2608/icefall-asr-alimeeting-pruned-transducer-stateless7",
166
+ # "greedy_search",
167
+ # 4,
168
+ # "Yes",
169
+ # "./test_wavs/alimeeting/R8008_M8013-8049-74.wav",
170
+ # ],
171
+ # [
172
+ # "Chinese",
173
+ # "desh2608/icefall-asr-alimeeting-pruned-transducer-stateless7",
174
+ # "greedy_search",
175
+ # 4,
176
+ # "Yes",
177
+ # "./test_wavs/alimeeting/R8009_M8020_N_SPK8026-8026-209.wav",
178
+ # ],
179
+ # [
180
+ # "English",
181
+ # "videodanchik/icefall-asr-tedlium3-conformer-ctc2",
182
+ # "greedy_search",
183
+ # 4,
184
+ # "Yes",
185
+ # "./test_wavs/tedlium3/DanBarber_2010-219.wav",
186
+ # ],
187
+ # [
188
+ # "English",
189
+ # "whisper-base.en",
190
+ # "greedy_search",
191
+ # 4,
192
+ # "Yes",
193
+ # "./test_wavs/tedlium3/DanielKahneman_2010-157.wav",
194
+ # ],
195
+ # [
196
+ # "English",
197
+ # "videodanchik/icefall-asr-tedlium3-conformer-ctc2",
198
+ # "greedy_search",
199
+ # 4,
200
+ # "Yes",
201
+ # "./test_wavs/tedlium3/RobertGupta_2010U-15.wav",
202
+ # ],
203
+ # # librispeech
204
+ # # https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless5-2022-05-13/tree/main/test_wavs
205
+ # [
206
+ # "English",
207
+ # "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13",
208
+ # "greedy_search",
209
+ # 4,
210
+ # "Yes",
211
+ # "./test_wavs/librispeech/1089-134686-0001.wav",
212
+ # ],
213
+ # [
214
+ # "English",
215
+ # "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13",
216
+ # "greedy_search",
217
+ # 4,
218
+ # "Yes",
219
+ # "./test_wavs/librispeech/1221-135766-0001.wav",
220
+ # ],
221
+ # [
222
+ # "English",
223
+ # "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13",
224
+ # "greedy_search",
225
+ # 4,
226
+ # "Yes",
227
+ # "./test_wavs/librispeech/1221-135766-0002.wav",
228
+ # ],
229
+ # # gigaspeech
230
+ # [
231
+ # "English",
232
+ # "wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2",
233
+ # "greedy_search",
234
+ # 4,
235
+ # "Yes",
236
+ # "./test_wavs/gigaspeech/1-minute-audiobook.opus",
237
+ # ],
238
+ # [
239
+ # "English",
240
+ # "wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2",
241
+ # "greedy_search",
242
+ # 4,
243
+ # "Yes",
244
+ # "./test_wavs/gigaspeech/100-seconds-podcast.opus",
245
+ # ],
246
+ # [
247
+ # "English",
248
+ # "wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2",
249
+ # "greedy_search",
250
+ # 4,
251
+ # "Yes",
252
+ # "./test_wavs/gigaspeech/100-seconds-youtube.opus",
253
+ # ],
254
+ # # wenetspeech
255
+ # # https://huggingface.co/luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2/tree/main/test_wavs
256
+ # [
257
+ # "Chinese",
258
+ # "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2",
259
+ # "greedy_search",
260
+ # 4,
261
+ # "Yes",
262
+ # "./test_wavs/wenetspeech/DEV_T0000000000.opus",
263
+ # ],
264
+ # [
265
+ # "Chinese",
266
+ # "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2",
267
+ # "greedy_search",
268
+ # 4,
269
+ # "Yes",
270
+ # "./test_wavs/wenetspeech/DEV_T0000000001.opus",
271
+ # ],
272
+ # [
273
+ # "Chinese",
274
+ # "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2",
275
+ # "greedy_search",
276
+ # 4,
277
+ # "Yes",
278
+ # "./test_wavs/wenetspeech/DEV_T0000000002.opus",
279
+ # ],
280
+ # # aishell2-A
281
+ # # https://huggingface.co/yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12/tree/main/test_wavs
282
+ # [
283
+ # "Chinese",
284
+ # "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12",
285
+ # "greedy_search",
286
+ # 4,
287
+ # "Yes",
288
+ # "./test_wavs/aishell2/ID0012W0030.wav",
289
+ # ],
290
+ # [
291
+ # "Chinese",
292
+ # "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12",
293
+ # "greedy_search",
294
+ # 4,
295
+ # "Yes",
296
+ # "./test_wavs/aishell2/ID0012W0162.wav",
297
+ # ],
298
+ # [
299
+ # "Chinese",
300
+ # "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12",
301
+ # "greedy_search",
302
+ # 4,
303
+ # "Yes",
304
+ # "./test_wavs/aishell2/ID0012W0215.wav",
305
+ # ],
306
+ # # aishell2-B
307
+ # # https://huggingface.co/yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12/tree/main/test_wavs
308
+ # [
309
+ # "Chinese",
310
+ # "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12",
311
+ # "greedy_search",
312
+ # 4,
313
+ # "Yes",
314
+ # "./test_wavs/aishell2/ID0012W0030.wav",
315
+ # ],
316
+ # [
317
+ # "Chinese",
318
+ # "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12",
319
+ # "greedy_search",
320
+ # 4,
321
+ # "Yes",
322
+ # "./test_wavs/aishell2/ID0012W0162.wav",
323
+ # ],
324
+ # [
325
+ # "Chinese",
326
+ # "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12",
327
+ # "greedy_search",
328
+ # 4,
329
+ # "Yes",
330
+ # "./test_wavs/aishell2/ID0012W0215.wav",
331
+ # ],
332
+ # # aishell2-B
333
+ # # https://huggingface.co/luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2/tree/main/test_wavs
334
+ # [
335
+ # "Chinese",
336
+ # "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
337
+ # "greedy_search",
338
+ # 4,
339
+ # "Yes",
340
+ # "./test_wavs/aidatatang_200zh/T0055G0036S0002.wav",
341
+ # ],
342
+ # [
343
+ # "Chinese",
344
+ # "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
345
+ # "greedy_search",
346
+ # 4,
347
+ # "Yes",
348
+ # "./test_wavs/aidatatang_200zh/T0055G0036S0003.wav",
349
+ # ],
350
+ # [
351
+ # "Chinese",
352
+ # "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
353
+ # "greedy_search",
354
+ # 4,
355
+ # "Yes",
356
+ # "./test_wavs/aidatatang_200zh/T0055G0036S0004.wav",
357
+ # ],
358
+ # # tal_csasr
359
+ # [
360
+ # "Chinese+English",
361
+ # "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh",
362
+ # "greedy_search",
363
+ # 4,
364
+ # "Yes",
365
+ # "./test_wavs/tal_csasr/210_36476_210_8341_1_1533271973_7057520_132.wav",
366
+ # ],
367
+ # [
368
+ # "Chinese+English",
369
+ # "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh",
370
+ # "greedy_search",
371
+ # 4,
372
+ # "Yes",
373
+ # "./test_wavs/tal_csasr/210_36476_210_8341_1_1533271973_7057520_138.wav",
374
+ # ],
375
+ # [
376
+ # "Chinese+English",
377
+ # "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh",
378
+ # "greedy_search",
379
+ # 4,
380
+ # "Yes",
381
+ # "./test_wavs/tal_csasr/210_36476_210_8341_1_1533271973_7057520_145.wav",
382
+ # ],
383
+ # [
384
+ # "Tibetan",
385
+ # "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless7-2022-12-02",
386
+ # "greedy_search",
387
+ # 4,
388
+ # "No",
389
+ # "./test_wavs/tibetan/a_0_cacm-A70_31116.wav",
390
+ # ],
391
+ # [
392
+ # "Tibetan",
393
+ # "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless7-2022-12-02",
394
+ # "greedy_search",
395
+ # 4,
396
+ # "No",
397
+ # "./test_wavs/tibetan/a_0_cacm-A70_31118.wav",
398
+ # ],
399
+ # # arabic
400
+ # [
401
+ # "Arabic",
402
+ # "AmirHussein/icefall-asr-mgb2-conformer_ctc-2022-27-06",
403
+ # "greedy_search",
404
+ # 4,
405
+ # "No",
406
+ # "./test_wavs/arabic/b.wav",
407
+ # ],
408
+ # [
409
+ # "Arabic",
410
+ # "AmirHussein/icefall-asr-mgb2-conformer_ctc-2022-27-06",
411
+ # "greedy_search",
412
+ # 4,
413
+ # "No",
414
+ # "./test_wavs/arabic/c.wav",
415
+ # ],
416
+ # [
417
+ # "German",
418
+ # "csukuangfj/wav2vec2.0-torchaudio",
419
+ # "greedy_search",
420
+ # 4,
421
+ # "No",
422
+ # "./test_wavs/german/20120315-0900-PLENARY-14-de_20120315.wav",
423
+ # ],
424
+ # [
425
+ # "French",
426
+ # "shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14",
427
+ # "greedy_search",
428
+ # 4,
429
+ # "No",
430
+ # "./test_wavs/french/common_voice_fr_19738183.wav",
431
+ # ],
432
+ # [
433
+ # "French",
434
+ # "shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14",
435
+ # "greedy_search",
436
+ # 4,
437
+ # "No",
438
+ # "./test_wavs/french/common_voice_fr_27024649.wav",
439
+ # ],
440
+ # [
441
+ # "Korean",
442
+ # "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",
443
+ # "greedy_search",
444
+ # 4,
445
+ # "No",
446
+ # "./test_wavs/korean/1.wav",
447
+ # ],
448
+ # [
449
+ # "Korean",
450
+ # "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",
451
+ # "greedy_search",
452
+ # 4,
453
+ # "No",
454
+ # "./test_wavs/korean/2.wav",
455
+ # ],
456
+ # [
457
+ # "Korean",
458
+ # "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",
459
+ # "greedy_search",
460
+ # 4,
461
+ # "No",
462
+ # "./test_wavs/korean/3.wav",
463
+ # ],
464
+ # [
465
+ # "Thai",
466
+ # "yfyeung/icefall-asr-gigaspeech2-th-zipformer-2024-06-20",
467
+ # "greedy_search",
468
+ # 4,
469
+ # "No",
470
+ # "./test_wavs/thai/1.wav",
471
+ # ],
472
+ # [
473
+ # "Thai",
474
+ # "yfyeung/icefall-asr-gigaspeech2-th-zipformer-2024-06-20",
475
+ # "greedy_search",
476
+ # 4,
477
+ # "No",
478
+ # "./test_wavs/thai/2.wav",
479
+ # ],
480
+ # [
481
+ # "Chinese+English+Cantonese+Japanese+Korean",
482
+ # "csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",
483
+ # "greedy_search",
484
+ # 4,
485
+ # "Yes",
486
+ # "./test_wavs/sense_voice/zh.wav",
487
+ # ],
488
+ # [
489
+ # "Chinese+English+Cantonese+Japanese+Korean",
490
+ # "csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",
491
+ # "greedy_search",
492
+ # 4,
493
+ # "Yes",
494
+ # "./test_wavs/sense_voice/en.wav",
495
+ # ],
496
+ # [
497
+ # "Chinese+English+Cantonese+Japanese+Korean",
498
+ # "csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",
499
+ # "greedy_search",
500
+ # 4,
501
+ # "Yes",
502
+ # "./test_wavs/sense_voice/ja.wav",
503
+ # ],
504
+ # [
505
+ # "Chinese+English+Cantonese+Japanese+Korean",
506
+ # "csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",
507
+ # "greedy_search",
508
+ # 4,
509
+ # "Yes",
510
+ # "./test_wavs/sense_voice/ko.wav",
511
+ # ],
512
+ # [
513
+ # "Japanese",
514
+ # "reazon-research/reazonspeech-k2-v2",
515
+ # "greedy_search",
516
+ # 4,
517
+ # "No",
518
+ # "./test_wavs/japanese/2.wav",
519
+ # ],
520
+ # [
521
+ # "Japanese",
522
+ # "reazon-research/reazonspeech-k2-v2",
523
+ # "greedy_search",
524
+ # 4,
525
+ # "No",
526
+ # "./test_wavs/japanese/3.wav",
527
+ # ],
528
+ # [
529
+ # "Japanese",
530
+ # "reazon-research/reazonspeech-k2-v2",
531
+ # "greedy_search",
532
+ # 4,
533
+ # "No",
534
+ # "./test_wavs/japanese/4.wav",
535
+ # ],
536
+ # [
537
+ # "Japanese",
538
+ # "reazon-research/reazonspeech-k2-v2",
539
+ # "greedy_search",
540
+ # 4,
541
+ # "No",
542
+ # "./test_wavs/japanese/5.wav",
543
+ # ],
544
+ ]
joiner-epoch-20-avg-10.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7311d2e17b810ecea515d79c71cc4668af8759256a06fa01d27047772320c821
3
+ size 1033417
joiner-epoch-20-avg-10.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d861afe55f7ff43c90069cad0a5d07261a408be5c7fd2aac8c84b1f3225da021
3
+ size 4104465
model.py ADDED
@@ -0,0 +1,2199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2022 Xiaomi Corp. (authors: Fangjun Kuang)
2
+ #
3
+ # See LICENSE for clarification regarding multiple authors
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ import os
18
+ from functools import lru_cache
19
+ from typing import Union
20
+
21
+ import torch
22
+ import torchaudio
23
+ from huggingface_hub import hf_hub_download
24
+
25
+ os.system("find / -name libk2*.so 2>/dev/null")
26
+
27
+ os.system(
28
+ "cp -v /usr/local/lib/python3.10/site-packages/k2/lib/*.so //usr/local/lib/python3.10/site-packages/sherpa/lib/"
29
+ )
30
+
31
+ os.system(
32
+ "cp -v /home/user/.local/lib/python3.10/site-packages/k2/lib/*.so /home/user/.local/lib/python3.10/site-packages/sherpa/lib/"
33
+ )
34
+
35
+ import k2 # noqa
36
+ import sherpa
37
+ import sherpa_onnx
38
+ import numpy as np
39
+ from typing import Tuple
40
+ import wave
41
+
42
+ sample_rate = 16000
43
+
44
+
45
+ def read_wave(wave_filename: str) -> Tuple[np.ndarray, int]:
46
+ """
47
+ Args:
48
+ wave_filename:
49
+ Path to a wave file. It should be single channel and each sample should
50
+ be 16-bit. Its sample rate does not need to be 16kHz.
51
+ Returns:
52
+ Return a tuple containing:
53
+ - A 1-D array of dtype np.float32 containing the samples, which are
54
+ normalized to the range [-1, 1].
55
+ - sample rate of the wave file
56
+ """
57
+
58
+ with wave.open(wave_filename) as f:
59
+ assert f.getnchannels() == 1, f.getnchannels()
60
+ assert f.getsampwidth() == 2, f.getsampwidth() # it is in bytes
61
+ num_samples = f.getnframes()
62
+ samples = f.readframes(num_samples)
63
+ samples_int16 = np.frombuffer(samples, dtype=np.int16)
64
+ samples_float32 = samples_int16.astype(np.float32)
65
+
66
+ samples_float32 = samples_float32 / 32768
67
+ return samples_float32, f.getframerate()
68
+
69
+
70
+ def decode_offline_recognizer(
71
+ recognizer: sherpa.OfflineRecognizer,
72
+ filename: str,
73
+ ) -> str:
74
+ s = recognizer.create_stream()
75
+
76
+ s.accept_wave_file(filename)
77
+ recognizer.decode_stream(s)
78
+
79
+ text = s.result.text.strip()
80
+ # return text.lower()
81
+ return text
82
+
83
+
84
+ def decode_online_recognizer(
85
+ recognizer: sherpa.OnlineRecognizer,
86
+ filename: str,
87
+ ) -> str:
88
+ samples, actual_sample_rate = torchaudio.load(filename)
89
+ assert sample_rate == actual_sample_rate, (
90
+ sample_rate,
91
+ actual_sample_rate,
92
+ )
93
+ samples = samples[0].contiguous()
94
+
95
+ s = recognizer.create_stream()
96
+
97
+ tail_padding = torch.zeros(int(sample_rate * 0.3), dtype=torch.float32)
98
+ s.accept_waveform(sample_rate, samples)
99
+ s.accept_waveform(sample_rate, tail_padding)
100
+ s.input_finished()
101
+
102
+ while recognizer.is_ready(s):
103
+ recognizer.decode_stream(s)
104
+
105
+ text = recognizer.get_result(s).text
106
+ # return text.strip().lower()
107
+ return text.strip()
108
+
109
+
110
+ def decode_offline_recognizer_sherpa_onnx(
111
+ recognizer: sherpa_onnx.OfflineRecognizer,
112
+ filename: str,
113
+ ) -> str:
114
+ s = recognizer.create_stream()
115
+ samples, sample_rate = read_wave(filename)
116
+ s.accept_waveform(sample_rate, samples)
117
+ recognizer.decode_stream(s)
118
+
119
+ # return s.result.text.lower()
120
+ return s.result.text
121
+
122
+
123
+ def decode_online_recognizer_sherpa_onnx(
124
+ recognizer: sherpa_onnx.OnlineRecognizer,
125
+ filename: str,
126
+ ) -> str:
127
+ s = recognizer.create_stream()
128
+ samples, sample_rate = read_wave(filename)
129
+ s.accept_waveform(sample_rate, samples)
130
+
131
+ tail_paddings = np.zeros(int(0.3 * sample_rate), dtype=np.float32)
132
+ s.accept_waveform(sample_rate, tail_paddings)
133
+ s.input_finished()
134
+
135
+ while recognizer.is_ready(s):
136
+ recognizer.decode_stream(s)
137
+
138
+ # return recognizer.get_result(s).lower()
139
+ return recognizer.get_result(s)
140
+
141
+
142
+ def decode(
143
+ recognizer: Union[
144
+ sherpa.OfflineRecognizer,
145
+ sherpa.OnlineRecognizer,
146
+ sherpa_onnx.OfflineRecognizer,
147
+ sherpa_onnx.OnlineRecognizer,
148
+ ],
149
+ filename: str,
150
+ ) -> str:
151
+ if isinstance(recognizer, sherpa.OfflineRecognizer):
152
+ return decode_offline_recognizer(recognizer, filename)
153
+ elif isinstance(recognizer, sherpa.OnlineRecognizer):
154
+ return decode_online_recognizer(recognizer, filename)
155
+ elif isinstance(recognizer, sherpa_onnx.OfflineRecognizer):
156
+ return decode_offline_recognizer_sherpa_onnx(recognizer, filename)
157
+ elif isinstance(recognizer, sherpa_onnx.OnlineRecognizer):
158
+ return decode_online_recognizer_sherpa_onnx(recognizer, filename)
159
+ else:
160
+ raise ValueError(f"Unknown recognizer type {type(recognizer)}")
161
+
162
+
163
+ @lru_cache(maxsize=30)
164
+ def get_pretrained_model(
165
+ repo_id: str,
166
+ decoding_method: str,
167
+ num_active_paths: int,
168
+ ) -> Union[sherpa.OfflineRecognizer, sherpa.OnlineRecognizer]:
169
+ if repo_id in multi_lingual_models:
170
+ return multi_lingual_models[repo_id](
171
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
172
+ )
173
+ elif repo_id in chinese_models:
174
+ return chinese_models[repo_id](
175
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
176
+ )
177
+ elif repo_id in chinese_dialect_models:
178
+ return chinese_dialect_models[repo_id](
179
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
180
+ )
181
+ elif repo_id in english_models:
182
+ return english_models[repo_id](
183
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
184
+ )
185
+ elif repo_id in chinese_english_mixed_models:
186
+ return chinese_english_mixed_models[repo_id](
187
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
188
+ )
189
+ elif repo_id in chinese_cantonese_english_models:
190
+ return chinese_cantonese_english_models[repo_id](
191
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
192
+ )
193
+ elif repo_id in chinese_cantonese_english_japanese_korean_models:
194
+ return chinese_cantonese_english_japanese_korean_models[repo_id](
195
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
196
+ )
197
+ elif repo_id in cantonese_models:
198
+ return cantonese_models[repo_id](
199
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
200
+ )
201
+ elif repo_id in tibetan_models:
202
+ return tibetan_models[repo_id](
203
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
204
+ )
205
+ elif repo_id in arabic_models:
206
+ return arabic_models[repo_id](
207
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
208
+ )
209
+ elif repo_id in german_models:
210
+ return german_models[repo_id](
211
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
212
+ )
213
+ elif repo_id in french_models:
214
+ return french_models[repo_id](
215
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
216
+ )
217
+ elif repo_id in japanese_models:
218
+ return japanese_models[repo_id](
219
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
220
+ )
221
+ elif repo_id in russian_models:
222
+ return russian_models[repo_id](
223
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
224
+ )
225
+ elif repo_id in korean_models:
226
+ return korean_models[repo_id](
227
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
228
+ )
229
+ elif repo_id in thai_models:
230
+ return thai_models[repo_id](
231
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
232
+ )
233
+ elif repo_id in vietnamese_models:
234
+ return vietnamese_models[repo_id](
235
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
236
+ )
237
+ elif repo_id in portuguese_brazlian_models:
238
+ return portuguese_brazlian_models[repo_id](
239
+ repo_id, decoding_method=decoding_method, num_active_paths=num_active_paths
240
+ )
241
+ else:
242
+ raise ValueError(f"Unsupported repo_id: {repo_id}")
243
+
244
+
245
+ def _get_nn_model_filename(
246
+ repo_id: str,
247
+ filename: str,
248
+ subfolder: str = "exp",
249
+ ) -> str:
250
+ nn_model_filename = hf_hub_download(
251
+ repo_id=repo_id,
252
+ filename=filename,
253
+ subfolder=subfolder,
254
+ )
255
+ return nn_model_filename
256
+
257
+
258
+ def _get_bpe_model_filename(
259
+ repo_id: str,
260
+ filename: str = "bpe.model",
261
+ subfolder: str = "data/lang_bpe_500",
262
+ ) -> str:
263
+ bpe_model_filename = hf_hub_download(
264
+ repo_id=repo_id,
265
+ filename=filename,
266
+ subfolder=subfolder,
267
+ )
268
+ return bpe_model_filename
269
+
270
+
271
+ def _get_token_filename(
272
+ repo_id: str,
273
+ filename: str = "tokens.txt",
274
+ subfolder: str = "data/lang_char",
275
+ ) -> str:
276
+ token_filename = hf_hub_download(
277
+ repo_id=repo_id,
278
+ filename=filename,
279
+ subfolder=subfolder,
280
+ )
281
+ return token_filename
282
+
283
+
284
+ @lru_cache(maxsize=10)
285
+ def _get_aishell2_pretrained_model(
286
+ repo_id: str,
287
+ decoding_method: str,
288
+ num_active_paths: int,
289
+ ) -> sherpa.OfflineRecognizer:
290
+ assert repo_id in [
291
+ # context-size 1
292
+ "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12", # noqa
293
+ # context-size 2
294
+ "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12", # noqa
295
+ ], repo_id
296
+
297
+ nn_model = _get_nn_model_filename(
298
+ repo_id=repo_id,
299
+ filename="cpu_jit.pt",
300
+ )
301
+ tokens = _get_token_filename(repo_id=repo_id)
302
+
303
+ feat_config = sherpa.FeatureConfig()
304
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
305
+ feat_config.fbank_opts.mel_opts.num_bins = 80
306
+ feat_config.fbank_opts.frame_opts.dither = 0
307
+
308
+ config = sherpa.OfflineRecognizerConfig(
309
+ nn_model=nn_model,
310
+ tokens=tokens,
311
+ use_gpu=False,
312
+ feat_config=feat_config,
313
+ decoding_method=decoding_method,
314
+ num_active_paths=num_active_paths,
315
+ )
316
+
317
+ recognizer = sherpa.OfflineRecognizer(config)
318
+
319
+ return recognizer
320
+
321
+
322
+ @lru_cache(maxsize=10)
323
+ def _get_offline_pre_trained_model(
324
+ repo_id: str, decoding_method: str, num_active_paths: int
325
+ ) -> sherpa_onnx.OfflineRecognizer:
326
+ assert repo_id in (
327
+ "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",
328
+ "reazon-research/reazonspeech-k2-v2",
329
+ ), repo_id
330
+
331
+ encoder_model = _get_nn_model_filename(
332
+ repo_id=repo_id,
333
+ filename="encoder-epoch-99-avg-1.int8.onnx",
334
+ subfolder=".",
335
+ )
336
+
337
+ decoder_model = _get_nn_model_filename(
338
+ repo_id=repo_id,
339
+ filename="decoder-epoch-99-avg-1.onnx",
340
+ subfolder=".",
341
+ )
342
+
343
+ joiner_model = _get_nn_model_filename(
344
+ repo_id=repo_id,
345
+ filename="joiner-epoch-99-avg-1.onnx",
346
+ subfolder=".",
347
+ )
348
+
349
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
350
+
351
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
352
+ tokens=tokens,
353
+ encoder=encoder_model,
354
+ decoder=decoder_model,
355
+ joiner=joiner_model,
356
+ num_threads=2,
357
+ sample_rate=16000,
358
+ feature_dim=80,
359
+ decoding_method=decoding_method,
360
+ )
361
+
362
+ return recognizer
363
+
364
+
365
+ @lru_cache(maxsize=10)
366
+ def _get_vietnamese_pretrained_model(
367
+ repo_id: str, decoding_method: str, num_active_paths: int
368
+ ) -> sherpa_onnx.OfflineRecognizer:
369
+ # assert repo_id in (
370
+ # "csukuangfj/sherpa-onnx-zipformer-vi-int8-2025-04-20",
371
+ # "csukuangfj/sherpa-onnx-zipformer-vi-2025-04-20",
372
+ # ), repo_id
373
+
374
+ # decoder_model = _get_nn_model_filename(
375
+ # repo_id=repo_id,
376
+ # filename="decoder-epoch-12-avg-8.onnx",
377
+ # subfolder=".",
378
+ # )
379
+
380
+ decoder_model = "decoder-epoch-20-avg-10.onnx"
381
+
382
+ if repo_id == "hynt/sherpa-onnx-zipformer-vi-int8-2025-10-16":
383
+ # encoder_model = _get_nn_model_filename(
384
+ # repo_id=repo_id,
385
+ # filename="encoder-epoch-12-avg-8.int8.onnx",
386
+ # subfolder=".",
387
+ # )
388
+
389
+ encoder_model = "encoder-epoch-20-avg-10.int8.onnx"
390
+
391
+ # joiner_model = _get_nn_model_filename(
392
+ # repo_id=repo_id,
393
+ # filename="joiner-epoch-12-avg-8.int8.onnx",
394
+ # subfolder=".",
395
+ # )
396
+ joiner_model = "joiner-epoch-20-avg-10.int8.onnx"
397
+ elif repo_id == "hynt/sherpa-onnx-zipformer-vi-2025-10-16":
398
+ # encoder_model = _get_nn_model_filename(
399
+ # repo_id=repo_id,
400
+ # filename="encoder-epoch-12-avg-8.onnx",
401
+ # subfolder=".",
402
+ # )
403
+
404
+ encoder_model = "encoder-epoch-20-avg-10.onnx"
405
+
406
+ # joiner_model = _get_nn_model_filename(
407
+ # repo_id=repo_id,
408
+ # filename="joiner-epoch-12-avg-8.onnx",
409
+ # subfolder=".",
410
+ # )
411
+ joiner_model = "joiner-epoch-20-avg-10.onnx"
412
+ else:
413
+ raise ValueError(f"repo_id: {repo_id}")
414
+
415
+ # tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
416
+
417
+ tokens = "config.json"
418
+
419
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
420
+ tokens=tokens,
421
+ encoder=encoder_model,
422
+ decoder=decoder_model,
423
+ joiner=joiner_model,
424
+ num_threads=2,
425
+ sample_rate=16000,
426
+ feature_dim=80,
427
+ decoding_method=decoding_method,
428
+ max_active_paths=num_active_paths
429
+ )
430
+
431
+ return recognizer
432
+
433
+
434
+ @lru_cache(maxsize=10)
435
+ def _get_yifan_thai_pretrained_model(
436
+ repo_id: str, decoding_method: str, num_active_paths: int
437
+ ) -> sherpa_onnx.OfflineRecognizer:
438
+ assert repo_id in (
439
+ "yfyeung/icefall-asr-gigaspeech2-th-zipformer-2024-06-20",
440
+ ), repo_id
441
+
442
+ encoder_model = _get_nn_model_filename(
443
+ repo_id=repo_id,
444
+ filename="encoder-epoch-12-avg-5.int8.onnx",
445
+ subfolder="exp",
446
+ )
447
+
448
+ decoder_model = _get_nn_model_filename(
449
+ repo_id=repo_id,
450
+ filename="decoder-epoch-12-avg-5.onnx",
451
+ subfolder="exp",
452
+ )
453
+
454
+ joiner_model = _get_nn_model_filename(
455
+ repo_id=repo_id,
456
+ filename="joiner-epoch-12-avg-5.int8.onnx",
457
+ subfolder="exp",
458
+ )
459
+
460
+ tokens = _get_token_filename(repo_id=repo_id, subfolder="data/lang_bpe_2000")
461
+
462
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
463
+ tokens=tokens,
464
+ encoder=encoder_model,
465
+ decoder=decoder_model,
466
+ joiner=joiner_model,
467
+ num_threads=2,
468
+ sample_rate=16000,
469
+ feature_dim=80,
470
+ decoding_method=decoding_method,
471
+ )
472
+
473
+ return recognizer
474
+
475
+
476
+ @lru_cache(maxsize=10)
477
+ def _get_zrjin_cantonese_pre_trained_model(
478
+ repo_id: str, decoding_method: str, num_active_paths: int
479
+ ) -> sherpa_onnx.OfflineRecognizer:
480
+ assert repo_id in ("zrjin/icefall-asr-mdcc-zipformer-2024-03-11",), repo_id
481
+
482
+ encoder_model = _get_nn_model_filename(
483
+ repo_id=repo_id,
484
+ filename="encoder-epoch-45-avg-35.int8.onnx",
485
+ subfolder="exp",
486
+ )
487
+
488
+ decoder_model = _get_nn_model_filename(
489
+ repo_id=repo_id,
490
+ filename="decoder-epoch-45-avg-35.onnx",
491
+ subfolder="exp",
492
+ )
493
+
494
+ joiner_model = _get_nn_model_filename(
495
+ repo_id=repo_id,
496
+ filename="joiner-epoch-45-avg-35.int8.onnx",
497
+ subfolder="exp",
498
+ )
499
+
500
+ tokens = _get_token_filename(repo_id=repo_id, subfolder="data/lang_char")
501
+
502
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
503
+ tokens=tokens,
504
+ encoder=encoder_model,
505
+ decoder=decoder_model,
506
+ joiner=joiner_model,
507
+ num_threads=2,
508
+ sample_rate=16000,
509
+ feature_dim=80,
510
+ decoding_method=decoding_method,
511
+ )
512
+
513
+ return recognizer
514
+
515
+
516
+ @lru_cache(maxsize=10)
517
+ def _get_russian_pre_trained_model_ctc(
518
+ repo_id: str, decoding_method: str, num_active_paths: int
519
+ ) -> sherpa_onnx.OfflineRecognizer:
520
+ assert repo_id in (
521
+ "csukuangfj/sherpa-onnx-nemo-ctc-giga-am-russian-2024-10-24",
522
+ "csukuangfj/sherpa-onnx-nemo-ctc-giga-am-v2-russian-2025-04-19",
523
+ ), repo_id
524
+
525
+ model = _get_nn_model_filename(
526
+ repo_id=repo_id,
527
+ filename="model.int8.onnx",
528
+ subfolder=".",
529
+ )
530
+
531
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
532
+
533
+ recognizer = sherpa_onnx.OfflineRecognizer.from_nemo_ctc(
534
+ model=model,
535
+ tokens=tokens,
536
+ num_threads=2,
537
+ )
538
+
539
+ return recognizer
540
+
541
+
542
+ @lru_cache(maxsize=10)
543
+ def _get_russian_pre_trained_model(
544
+ repo_id: str, decoding_method: str, num_active_paths: int
545
+ ) -> sherpa_onnx.OfflineRecognizer:
546
+ assert repo_id in (
547
+ "alphacep/vosk-model-ru",
548
+ "alphacep/vosk-model-small-ru",
549
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-russian-2024-10-24",
550
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-v2-russian-2025-04-19",
551
+ ), repo_id
552
+
553
+ if repo_id == "alphacep/vosk-model-ru":
554
+ model_dir = "am-onnx"
555
+ encoder = "encoder.onnx"
556
+ model_type = "transducer"
557
+ elif repo_id == "alphacep/vosk-model-small-ru":
558
+ model_dir = "am"
559
+ encoder = "encoder.onnx"
560
+ model_type = "transducer"
561
+ elif repo_id in (
562
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-russian-2024-10-24",
563
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-v2-russian-2025-04-19",
564
+ ):
565
+ model_dir = "."
566
+ encoder = "encoder.int8.onnx"
567
+ model_type = "nemo_transducer"
568
+
569
+ encoder_model = _get_nn_model_filename(
570
+ repo_id=repo_id,
571
+ filename=encoder,
572
+ subfolder=model_dir,
573
+ )
574
+
575
+ decoder_model = _get_nn_model_filename(
576
+ repo_id=repo_id,
577
+ filename="decoder.onnx",
578
+ subfolder=model_dir,
579
+ )
580
+
581
+ joiner_model = _get_nn_model_filename(
582
+ repo_id=repo_id,
583
+ filename="joiner.onnx",
584
+ subfolder=model_dir,
585
+ )
586
+
587
+ if repo_id in (
588
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-russian-2024-10-24",
589
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-v2-russian-2025-04-19",
590
+ ):
591
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
592
+ else:
593
+ tokens = _get_token_filename(repo_id=repo_id, subfolder="lang")
594
+
595
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
596
+ tokens=tokens,
597
+ encoder=encoder_model,
598
+ decoder=decoder_model,
599
+ joiner=joiner_model,
600
+ num_threads=2,
601
+ sample_rate=16000,
602
+ feature_dim=80,
603
+ decoding_method=decoding_method,
604
+ model_type=model_type,
605
+ )
606
+
607
+ return recognizer
608
+
609
+
610
+ @lru_cache(maxsize=10)
611
+ def _get_moonshine_model(
612
+ repo_id: str, decoding_method: str, num_active_paths: int
613
+ ) -> sherpa_onnx.OfflineRecognizer:
614
+ assert repo_id in ("moonshine-tiny", "moonshine-base"), repo_id
615
+
616
+ if repo_id == "moonshine-tiny":
617
+ full_repo_id = "csukuangfj/sherpa-onnx-moonshine-tiny-en-int8"
618
+ elif repo_id == "moonshine-base":
619
+ full_repo_id = "csukuangfj/sherpa-onnx-moonshine-base-en-int8"
620
+ else:
621
+ raise ValueError(f"Unknown repo_id: {repo_id}")
622
+
623
+ preprocessor = _get_nn_model_filename(
624
+ repo_id=full_repo_id,
625
+ filename=f"preprocess.onnx",
626
+ subfolder=".",
627
+ )
628
+
629
+ encoder = _get_nn_model_filename(
630
+ repo_id=full_repo_id,
631
+ filename=f"encode.int8.onnx",
632
+ subfolder=".",
633
+ )
634
+
635
+ uncached_decoder = _get_nn_model_filename(
636
+ repo_id=full_repo_id,
637
+ filename=f"uncached_decode.int8.onnx",
638
+ subfolder=".",
639
+ )
640
+
641
+ cached_decoder = _get_nn_model_filename(
642
+ repo_id=full_repo_id,
643
+ filename=f"cached_decode.int8.onnx",
644
+ subfolder=".",
645
+ )
646
+
647
+ tokens = _get_token_filename(
648
+ repo_id=full_repo_id,
649
+ subfolder=".",
650
+ filename="tokens.txt",
651
+ )
652
+
653
+ recognizer = sherpa_onnx.OfflineRecognizer.from_moonshine(
654
+ preprocessor=preprocessor,
655
+ encoder=encoder,
656
+ uncached_decoder=uncached_decoder,
657
+ cached_decoder=cached_decoder,
658
+ tokens=tokens,
659
+ num_threads=2,
660
+ )
661
+
662
+ return recognizer
663
+
664
+
665
+ @lru_cache(maxsize=10)
666
+ def _get_whisper_model(
667
+ repo_id: str, decoding_method: str, num_active_paths: int
668
+ ) -> sherpa_onnx.OfflineRecognizer:
669
+ name = repo_id.split("-")[1]
670
+ assert name in ("tiny.en", "base.en", "small.en", "medium.en"), repo_id
671
+ full_repo_id = "csukuangfj/sherpa-onnx-whisper-" + name
672
+ encoder = _get_nn_model_filename(
673
+ repo_id=full_repo_id,
674
+ filename=f"{name}-encoder.int8.onnx",
675
+ subfolder=".",
676
+ )
677
+
678
+ decoder = _get_nn_model_filename(
679
+ repo_id=full_repo_id,
680
+ filename=f"{name}-decoder.int8.onnx",
681
+ subfolder=".",
682
+ )
683
+
684
+ tokens = _get_token_filename(
685
+ repo_id=full_repo_id, subfolder=".", filename=f"{name}-tokens.txt"
686
+ )
687
+
688
+ recognizer = sherpa_onnx.OfflineRecognizer.from_whisper(
689
+ encoder=encoder,
690
+ decoder=decoder,
691
+ tokens=tokens,
692
+ num_threads=2,
693
+ )
694
+
695
+ return recognizer
696
+
697
+
698
+ @lru_cache(maxsize=10)
699
+ def _get_gigaspeech_pre_trained_model(
700
+ repo_id: str,
701
+ decoding_method: str,
702
+ num_active_paths: int,
703
+ ) -> sherpa.OfflineRecognizer:
704
+ # assert repo_id in [
705
+ # "wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2",
706
+ # ], repo_id
707
+ assert repo_id in (
708
+ "csukuangfj/sherpa-onnx-zipformer-vi-int8-2025-04-20",
709
+ "csukuangfj/sherpa-onnx-zipformer-vi-2025-04-20",
710
+ ), repo_id
711
+
712
+ nn_model = "jit_script.pt"
713
+ tokens = "tokens.txt"
714
+
715
+ feat_config = sherpa.FeatureConfig()
716
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
717
+ feat_config.fbank_opts.mel_opts.num_bins = 80
718
+ feat_config.fbank_opts.frame_opts.dither = 0
719
+
720
+ config = sherpa.OfflineRecognizerConfig(
721
+ nn_model=nn_model,
722
+ tokens=tokens,
723
+ use_gpu=False,
724
+ feat_config=feat_config,
725
+ decoding_method=decoding_method,
726
+ num_active_paths=num_active_paths,
727
+ )
728
+
729
+ recognizer = sherpa.OfflineRecognizer(config)
730
+
731
+ return recognizer
732
+
733
+
734
+ @lru_cache(maxsize=10)
735
+ def _get_english_model(
736
+ repo_id: str,
737
+ decoding_method: str,
738
+ num_active_paths: int,
739
+ ) -> sherpa.OfflineRecognizer:
740
+ assert repo_id in [
741
+ "WeijiZhuang/icefall-asr-librispeech-pruned-transducer-stateless8-2022-12-02", # noqa
742
+ "yfyeung/icefall-asr-multidataset-pruned_transducer_stateless7-2023-05-04", # noqa
743
+ "yfyeung/icefall-asr-finetune-mux-pruned_transducer_stateless7-2023-05-19", # noqa
744
+ "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13", # noqa
745
+ "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11", # noqa
746
+ "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless8-2022-11-14", # noqa
747
+ "Zengwei/icefall-asr-librispeech-zipformer-large-2023-05-16", # noqa
748
+ "Zengwei/icefall-asr-librispeech-zipformer-2023-05-15", # noqa
749
+ "Zengwei/icefall-asr-librispeech-zipformer-small-2023-05-16", # noqa
750
+ "videodanchik/icefall-asr-tedlium3-conformer-ctc2",
751
+ "pkufool/icefall_asr_librispeech_conformer_ctc",
752
+ "WayneWiser/icefall-asr-librispeech-conformer-ctc2-jit-bpe-500-2022-07-21",
753
+ ], repo_id
754
+
755
+ filename = "cpu_jit.pt"
756
+ if (
757
+ repo_id
758
+ == "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11"
759
+ ):
760
+ filename = "cpu_jit-torch-1.10.0.pt"
761
+
762
+ if (
763
+ repo_id
764
+ == "WeijiZhuang/icefall-asr-librispeech-pruned-transducer-stateless8-2022-12-02"
765
+ ):
766
+ filename = "cpu_jit-torch-1.10.pt"
767
+
768
+ if (
769
+ repo_id
770
+ == "yfyeung/icefall-asr-multidataset-pruned_transducer_stateless7-2023-05-04"
771
+ ):
772
+ filename = "cpu_jit-epoch-30-avg-4.pt"
773
+
774
+ if (
775
+ repo_id
776
+ == "yfyeung/icefall-asr-finetune-mux-pruned_transducer_stateless7-2023-05-19"
777
+ ):
778
+ filename = "cpu_jit-epoch-20-avg-5.pt"
779
+
780
+ if repo_id in (
781
+ "Zengwei/icefall-asr-librispeech-zipformer-large-2023-05-16",
782
+ "Zengwei/icefall-asr-librispeech-zipformer-2023-05-15",
783
+ "Zengwei/icefall-asr-librispeech-zipformer-small-2023-05-16",
784
+ ):
785
+ filename = "jit_script.pt"
786
+
787
+ nn_model = _get_nn_model_filename(
788
+ repo_id=repo_id,
789
+ filename=filename,
790
+ )
791
+ subfolder = "data/lang_bpe_500"
792
+
793
+ if repo_id in (
794
+ "videodanchik/icefall-asr-tedlium3-conformer-ctc2",
795
+ "pkufool/icefall_asr_librispeech_conformer_ctc",
796
+ ):
797
+ subfolder = "data/lang_bpe"
798
+
799
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=subfolder)
800
+
801
+ feat_config = sherpa.FeatureConfig()
802
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
803
+ feat_config.fbank_opts.mel_opts.num_bins = 80
804
+ feat_config.fbank_opts.frame_opts.dither = 0
805
+
806
+ config = sherpa.OfflineRecognizerConfig(
807
+ nn_model=nn_model,
808
+ tokens=tokens,
809
+ use_gpu=False,
810
+ feat_config=feat_config,
811
+ decoding_method=decoding_method,
812
+ num_active_paths=num_active_paths,
813
+ )
814
+
815
+ recognizer = sherpa.OfflineRecognizer(config)
816
+
817
+ return recognizer
818
+
819
+
820
+ @lru_cache(maxsize=10)
821
+ def _get_wenetspeech_pre_trained_model(
822
+ repo_id: str,
823
+ decoding_method: str,
824
+ num_active_paths: int,
825
+ ):
826
+ assert repo_id in [
827
+ "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2",
828
+ ], repo_id
829
+
830
+ nn_model = _get_nn_model_filename(
831
+ repo_id=repo_id,
832
+ filename="cpu_jit_epoch_10_avg_2_torch_1.7.1.pt",
833
+ )
834
+ tokens = _get_token_filename(repo_id=repo_id)
835
+
836
+ feat_config = sherpa.FeatureConfig()
837
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
838
+ feat_config.fbank_opts.mel_opts.num_bins = 80
839
+ feat_config.fbank_opts.frame_opts.dither = 0
840
+
841
+ config = sherpa.OfflineRecognizerConfig(
842
+ nn_model=nn_model,
843
+ tokens=tokens,
844
+ use_gpu=False,
845
+ feat_config=feat_config,
846
+ decoding_method=decoding_method,
847
+ num_active_paths=num_active_paths,
848
+ )
849
+
850
+ recognizer = sherpa.OfflineRecognizer(config)
851
+
852
+ return recognizer
853
+
854
+
855
+ @lru_cache(maxsize=1)
856
+ def _get_fire_red_asr_models(repo_id: str, decoding_method: str, num_active_paths: int):
857
+ assert repo_id in (
858
+ "csukuangfj/sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16",
859
+ ), repo_id
860
+
861
+ encoder = _get_nn_model_filename(
862
+ repo_id=repo_id,
863
+ filename="encoder.int8.onnx",
864
+ subfolder=".",
865
+ )
866
+
867
+ decoder = _get_nn_model_filename(
868
+ repo_id=repo_id,
869
+ filename="decoder.int8.onnx",
870
+ subfolder=".",
871
+ )
872
+
873
+ tokens = _get_nn_model_filename(
874
+ repo_id=repo_id,
875
+ filename="tokens.txt",
876
+ subfolder=".",
877
+ )
878
+
879
+ return sherpa_onnx.OfflineRecognizer.from_fire_red_asr(
880
+ encoder=encoder,
881
+ decoder=decoder,
882
+ tokens=tokens,
883
+ num_threads=2,
884
+ )
885
+
886
+
887
+ @lru_cache(maxsize=10)
888
+ def _get_chinese_english_mixed_model_onnx(
889
+ repo_id: str,
890
+ decoding_method: str,
891
+ num_active_paths: int,
892
+ ) -> sherpa_onnx.OfflineRecognizer:
893
+ assert repo_id in [
894
+ "zrjin/icefall-asr-zipformer-multi-zh-en-2023-11-22",
895
+ ], repo_id
896
+
897
+ encoder_model = _get_nn_model_filename(
898
+ repo_id=repo_id,
899
+ filename="encoder-epoch-34-avg-19.int8.onnx",
900
+ subfolder="exp",
901
+ )
902
+
903
+ decoder_model = _get_nn_model_filename(
904
+ repo_id=repo_id,
905
+ filename="decoder-epoch-34-avg-19.onnx",
906
+ subfolder="exp",
907
+ )
908
+
909
+ joiner_model = _get_nn_model_filename(
910
+ repo_id=repo_id,
911
+ filename="joiner-epoch-34-avg-19.int8.onnx",
912
+ subfolder="exp",
913
+ )
914
+
915
+ tokens = _get_token_filename(repo_id=repo_id, subfolder="data/lang_bbpe_2000")
916
+
917
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
918
+ tokens=tokens,
919
+ encoder=encoder_model,
920
+ decoder=decoder_model,
921
+ joiner=joiner_model,
922
+ num_threads=2,
923
+ sample_rate=16000,
924
+ feature_dim=80,
925
+ decoding_method=decoding_method,
926
+ max_active_paths=num_active_paths,
927
+ )
928
+
929
+ return recognizer
930
+
931
+
932
+ @lru_cache(maxsize=10)
933
+ def _get_chinese_english_mixed_model(
934
+ repo_id: str,
935
+ decoding_method: str,
936
+ num_active_paths: int,
937
+ ) -> sherpa.OfflineRecognizer:
938
+ assert repo_id in [
939
+ "luomingshuang/icefall_asr_tal-csasr_pruned_transducer_stateless5",
940
+ "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh",
941
+ ], repo_id
942
+
943
+ if repo_id == "luomingshuang/icefall_asr_tal-csasr_pruned_transducer_stateless5":
944
+ filename = "cpu_jit.pt"
945
+ subfolder = "data/lang_char"
946
+ elif repo_id == "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh":
947
+ filename = "cpu_jit-epoch-11-avg-1.pt"
948
+ subfolder = "data/lang_char_bpe"
949
+
950
+ nn_model = _get_nn_model_filename(
951
+ repo_id=repo_id,
952
+ filename=filename,
953
+ )
954
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=subfolder)
955
+
956
+ feat_config = sherpa.FeatureConfig()
957
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
958
+ feat_config.fbank_opts.mel_opts.num_bins = 80
959
+ feat_config.fbank_opts.frame_opts.dither = 0
960
+
961
+ config = sherpa.OfflineRecognizerConfig(
962
+ nn_model=nn_model,
963
+ tokens=tokens,
964
+ use_gpu=False,
965
+ feat_config=feat_config,
966
+ decoding_method=decoding_method,
967
+ num_active_paths=num_active_paths,
968
+ )
969
+
970
+ recognizer = sherpa.OfflineRecognizer(config)
971
+
972
+ return recognizer
973
+
974
+
975
+ @lru_cache(maxsize=10)
976
+ def _get_alimeeting_pre_trained_model(
977
+ repo_id: str,
978
+ decoding_method: str,
979
+ num_active_paths: int,
980
+ ):
981
+ assert repo_id in [
982
+ "desh2608/icefall-asr-alimeeting-pruned-transducer-stateless7",
983
+ "luomingshuang/icefall_asr_alimeeting_pruned_transducer_stateless2",
984
+ ], repo_id
985
+
986
+ if repo_id == "desh2608/icefall-asr-alimeeting-pruned-transducer-stateless7":
987
+ filename = "cpu_jit.pt"
988
+ elif repo_id == "luomingshuang/icefall_asr_alimeeting_pruned_transducer_stateless2":
989
+ filename = "cpu_jit_torch_1.7.1.pt"
990
+
991
+ nn_model = _get_nn_model_filename(
992
+ repo_id=repo_id,
993
+ filename=filename,
994
+ )
995
+ tokens = _get_token_filename(repo_id=repo_id)
996
+
997
+ feat_config = sherpa.FeatureConfig()
998
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
999
+ feat_config.fbank_opts.mel_opts.num_bins = 80
1000
+ feat_config.fbank_opts.frame_opts.dither = 0
1001
+
1002
+ config = sherpa.OfflineRecognizerConfig(
1003
+ nn_model=nn_model,
1004
+ tokens=tokens,
1005
+ use_gpu=False,
1006
+ feat_config=feat_config,
1007
+ decoding_method=decoding_method,
1008
+ num_active_paths=num_active_paths,
1009
+ )
1010
+
1011
+ recognizer = sherpa.OfflineRecognizer(config)
1012
+
1013
+ return recognizer
1014
+
1015
+
1016
+ @lru_cache(maxsize=4)
1017
+ def _get_dolphin_ctc_models(repo_id: str, decoding_method: str, num_active_paths: int):
1018
+ assert repo_id in [
1019
+ "csukuangfj/sherpa-onnx-dolphin-base-ctc-multi-lang-int8-2025-04-02",
1020
+ "csukuangfj/sherpa-onnx-dolphin-small-ctc-multi-lang-int8-2025-04-02",
1021
+ "csukuangfj/sherpa-onnx-dolphin-base-ctc-multi-lang-2025-04-02",
1022
+ "csukuangfj/sherpa-onnx-dolphin-small-ctc-multi-lang-2025-04-02",
1023
+ ], repo_id
1024
+
1025
+ if repo_id in [
1026
+ "csukuangfj/sherpa-onnx-dolphin-base-ctc-multi-lang-int8-2025-04-02",
1027
+ "csukuangfj/sherpa-onnx-dolphin-small-ctc-multi-lang-int8-2025-04-02",
1028
+ ]:
1029
+ use_int8 = True
1030
+ else:
1031
+ use_int8 = False
1032
+
1033
+ nn_model = _get_nn_model_filename(
1034
+ repo_id=repo_id,
1035
+ filename="model.int8.onnx" if use_int8 else "model.onnx",
1036
+ subfolder=".",
1037
+ )
1038
+ tokens = _get_token_filename(
1039
+ repo_id=repo_id,
1040
+ filename="tokens.txt",
1041
+ subfolder=".",
1042
+ )
1043
+
1044
+ recognizer = sherpa_onnx.OfflineRecognizer.from_dolphin_ctc(
1045
+ tokens=tokens,
1046
+ model=nn_model,
1047
+ num_threads=2,
1048
+ )
1049
+
1050
+ return recognizer
1051
+
1052
+
1053
+ @lru_cache(maxsize=10)
1054
+ def _get_wenet_model(
1055
+ repo_id: str,
1056
+ decoding_method: str,
1057
+ num_active_paths: int,
1058
+ ):
1059
+ assert repo_id in [
1060
+ "csukuangfj/wenet-chinese-model",
1061
+ "csukuangfj/wenet-english-model",
1062
+ ], repo_id
1063
+
1064
+ nn_model = _get_nn_model_filename(
1065
+ repo_id=repo_id,
1066
+ filename="final.zip",
1067
+ subfolder=".",
1068
+ )
1069
+ tokens = _get_token_filename(
1070
+ repo_id=repo_id,
1071
+ filename="units.txt",
1072
+ subfolder=".",
1073
+ )
1074
+
1075
+ feat_config = sherpa.FeatureConfig(normalize_samples=False)
1076
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
1077
+ feat_config.fbank_opts.mel_opts.num_bins = 80
1078
+ feat_config.fbank_opts.frame_opts.dither = 0
1079
+
1080
+ config = sherpa.OfflineRecognizerConfig(
1081
+ nn_model=nn_model,
1082
+ tokens=tokens,
1083
+ use_gpu=False,
1084
+ feat_config=feat_config,
1085
+ decoding_method=decoding_method,
1086
+ num_active_paths=num_active_paths,
1087
+ )
1088
+
1089
+ recognizer = sherpa.OfflineRecognizer(config)
1090
+
1091
+ return recognizer
1092
+
1093
+
1094
+ @lru_cache(maxsize=10)
1095
+ def _get_aidatatang_200zh_pretrained_mode(
1096
+ repo_id: str,
1097
+ decoding_method: str,
1098
+ num_active_paths: int,
1099
+ ):
1100
+ assert repo_id in [
1101
+ "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
1102
+ ], repo_id
1103
+
1104
+ nn_model = _get_nn_model_filename(
1105
+ repo_id=repo_id,
1106
+ filename="cpu_jit_torch.1.7.1.pt",
1107
+ )
1108
+ tokens = _get_token_filename(repo_id=repo_id)
1109
+
1110
+ feat_config = sherpa.FeatureConfig()
1111
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
1112
+ feat_config.fbank_opts.mel_opts.num_bins = 80
1113
+ feat_config.fbank_opts.frame_opts.dither = 0
1114
+
1115
+ config = sherpa.OfflineRecognizerConfig(
1116
+ nn_model=nn_model,
1117
+ tokens=tokens,
1118
+ use_gpu=False,
1119
+ feat_config=feat_config,
1120
+ decoding_method=decoding_method,
1121
+ num_active_paths=num_active_paths,
1122
+ )
1123
+
1124
+ recognizer = sherpa.OfflineRecognizer(config)
1125
+
1126
+ return recognizer
1127
+
1128
+
1129
+ @lru_cache(maxsize=10)
1130
+ def _get_tibetan_pre_trained_model(
1131
+ repo_id: str,
1132
+ decoding_method: str,
1133
+ num_active_paths: int,
1134
+ ):
1135
+ assert repo_id in [
1136
+ "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless7-2022-12-02",
1137
+ "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless5-2022-11-29",
1138
+ ], repo_id
1139
+
1140
+ filename = "cpu_jit.pt"
1141
+ if (
1142
+ repo_id
1143
+ == "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless5-2022-11-29"
1144
+ ):
1145
+ filename = "cpu_jit-epoch-28-avg-23-torch-1.10.0.pt"
1146
+
1147
+ nn_model = _get_nn_model_filename(
1148
+ repo_id=repo_id,
1149
+ filename=filename,
1150
+ )
1151
+
1152
+ tokens = _get_token_filename(repo_id=repo_id, subfolder="data/lang_bpe_500")
1153
+
1154
+ feat_config = sherpa.FeatureConfig()
1155
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
1156
+ feat_config.fbank_opts.mel_opts.num_bins = 80
1157
+ feat_config.fbank_opts.frame_opts.dither = 0
1158
+
1159
+ config = sherpa.OfflineRecognizerConfig(
1160
+ nn_model=nn_model,
1161
+ tokens=tokens,
1162
+ use_gpu=False,
1163
+ feat_config=feat_config,
1164
+ decoding_method=decoding_method,
1165
+ num_active_paths=num_active_paths,
1166
+ )
1167
+
1168
+ recognizer = sherpa.OfflineRecognizer(config)
1169
+
1170
+ return recognizer
1171
+
1172
+
1173
+ @lru_cache(maxsize=10)
1174
+ def _get_arabic_pre_trained_model(
1175
+ repo_id: str,
1176
+ decoding_method: str,
1177
+ num_active_paths: int,
1178
+ ):
1179
+ assert repo_id in [
1180
+ "AmirHussein/icefall-asr-mgb2-conformer_ctc-2022-27-06",
1181
+ ], repo_id
1182
+
1183
+ nn_model = _get_nn_model_filename(
1184
+ repo_id=repo_id,
1185
+ filename="cpu_jit.pt",
1186
+ )
1187
+
1188
+ tokens = _get_token_filename(repo_id=repo_id, subfolder="data/lang_bpe_5000")
1189
+
1190
+ feat_config = sherpa.FeatureConfig()
1191
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
1192
+ feat_config.fbank_opts.mel_opts.num_bins = 80
1193
+ feat_config.fbank_opts.frame_opts.dither = 0
1194
+
1195
+ config = sherpa.OfflineRecognizerConfig(
1196
+ nn_model=nn_model,
1197
+ tokens=tokens,
1198
+ use_gpu=False,
1199
+ feat_config=feat_config,
1200
+ decoding_method=decoding_method,
1201
+ num_active_paths=num_active_paths,
1202
+ )
1203
+
1204
+ recognizer = sherpa.OfflineRecognizer(config)
1205
+
1206
+ return recognizer
1207
+
1208
+
1209
+ @lru_cache(maxsize=10)
1210
+ def _get_german_pre_trained_model(
1211
+ repo_id: str,
1212
+ decoding_method: str,
1213
+ num_active_paths: int,
1214
+ ):
1215
+ assert repo_id in [
1216
+ "csukuangfj/wav2vec2.0-torchaudio",
1217
+ ], repo_id
1218
+
1219
+ nn_model = _get_nn_model_filename(
1220
+ repo_id=repo_id,
1221
+ filename="voxpopuli_asr_base_10k_de.pt",
1222
+ subfolder=".",
1223
+ )
1224
+
1225
+ tokens = _get_token_filename(
1226
+ repo_id=repo_id,
1227
+ filename="tokens-de.txt",
1228
+ subfolder=".",
1229
+ )
1230
+
1231
+ config = sherpa.OfflineRecognizerConfig(
1232
+ nn_model=nn_model,
1233
+ tokens=tokens,
1234
+ use_gpu=False,
1235
+ decoding_method=decoding_method,
1236
+ num_active_paths=num_active_paths,
1237
+ )
1238
+
1239
+ recognizer = sherpa.OfflineRecognizer(config)
1240
+
1241
+ return recognizer
1242
+
1243
+
1244
+ @lru_cache(maxsize=10)
1245
+ def _get_french_pre_trained_model(
1246
+ repo_id: str,
1247
+ decoding_method: str,
1248
+ num_active_paths: int,
1249
+ ) -> sherpa_onnx.OnlineRecognizer:
1250
+ assert repo_id in [
1251
+ "shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14",
1252
+ ], repo_id
1253
+
1254
+ encoder_model = _get_nn_model_filename(
1255
+ repo_id=repo_id,
1256
+ filename="encoder-epoch-29-avg-9-with-averaged-model.onnx",
1257
+ subfolder=".",
1258
+ )
1259
+
1260
+ decoder_model = _get_nn_model_filename(
1261
+ repo_id=repo_id,
1262
+ filename="decoder-epoch-29-avg-9-with-averaged-model.onnx",
1263
+ subfolder=".",
1264
+ )
1265
+
1266
+ joiner_model = _get_nn_model_filename(
1267
+ repo_id=repo_id,
1268
+ filename="joiner-epoch-29-avg-9-with-averaged-model.onnx",
1269
+ subfolder=".",
1270
+ )
1271
+
1272
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1273
+
1274
+ recognizer = sherpa_onnx.OnlineRecognizer.from_transducer(
1275
+ tokens=tokens,
1276
+ encoder=encoder_model,
1277
+ decoder=decoder_model,
1278
+ joiner=joiner_model,
1279
+ num_threads=2,
1280
+ sample_rate=16000,
1281
+ feature_dim=80,
1282
+ decoding_method=decoding_method,
1283
+ max_active_paths=num_active_paths,
1284
+ )
1285
+
1286
+ return recognizer
1287
+
1288
+
1289
+ @lru_cache(maxsize=10)
1290
+ def _get_sherpa_onnx_nemo_transducer_models_int8(
1291
+ repo_id: str,
1292
+ decoding_method: str,
1293
+ num_active_paths: int,
1294
+ ) -> sherpa_onnx.OfflineRecognizer:
1295
+ assert repo_id in [
1296
+ "csukuangfj/sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8",
1297
+ "csukuangfj/sherpa-onnx-nemo-transducer-stt_de_fastconformer_hybrid_large_pc-int8",
1298
+ "csukuangfj/sherpa-onnx-nemo-transducer-stt_pt_fastconformer_hybrid_large_pc-int8",
1299
+ ], repo_id
1300
+
1301
+ encoder_model = _get_nn_model_filename(
1302
+ repo_id=repo_id,
1303
+ filename="encoder.int8.onnx",
1304
+ subfolder=".",
1305
+ )
1306
+
1307
+ decoder_model = _get_nn_model_filename(
1308
+ repo_id=repo_id,
1309
+ filename="decoder.int8.onnx",
1310
+ subfolder=".",
1311
+ )
1312
+
1313
+ joiner_model = _get_nn_model_filename(
1314
+ repo_id=repo_id,
1315
+ filename="joiner.int8.onnx",
1316
+ subfolder=".",
1317
+ )
1318
+
1319
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1320
+
1321
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
1322
+ tokens=tokens,
1323
+ encoder=encoder_model,
1324
+ decoder=decoder_model,
1325
+ joiner=joiner_model,
1326
+ num_threads=2,
1327
+ sample_rate=16000,
1328
+ feature_dim=80, # no used
1329
+ model_type="nemo_transducer",
1330
+ decoding_method=decoding_method,
1331
+ max_active_paths=num_active_paths,
1332
+ )
1333
+
1334
+ return recognizer
1335
+
1336
+
1337
+ @lru_cache(maxsize=10)
1338
+ def _get_sherpa_onnx_nemo_transducer_models(
1339
+ repo_id: str,
1340
+ decoding_method: str,
1341
+ num_active_paths: int,
1342
+ ) -> sherpa_onnx.OfflineRecognizer:
1343
+ assert repo_id in [
1344
+ "csukuangfj/sherpa-onnx-nemo-parakeet_tdt_transducer_110m-en-36000",
1345
+ "csukuangfj/sherpa-onnx-nemo-transducer-stt_de_fastconformer_hybrid_large_pc",
1346
+ "csukuangfj/sherpa-onnx-nemo-transducer-stt_pt_fastconformer_hybrid_large_pc",
1347
+ ], repo_id
1348
+
1349
+ encoder_model = _get_nn_model_filename(
1350
+ repo_id=repo_id,
1351
+ filename="encoder.onnx",
1352
+ subfolder=".",
1353
+ )
1354
+
1355
+ decoder_model = _get_nn_model_filename(
1356
+ repo_id=repo_id,
1357
+ filename="decoder.onnx",
1358
+ subfolder=".",
1359
+ )
1360
+
1361
+ joiner_model = _get_nn_model_filename(
1362
+ repo_id=repo_id,
1363
+ filename="joiner.onnx",
1364
+ subfolder=".",
1365
+ )
1366
+
1367
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1368
+
1369
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
1370
+ tokens=tokens,
1371
+ encoder=encoder_model,
1372
+ decoder=decoder_model,
1373
+ joiner=joiner_model,
1374
+ num_threads=2,
1375
+ sample_rate=16000,
1376
+ feature_dim=80,
1377
+ model_type="nemo_transducer",
1378
+ decoding_method=decoding_method,
1379
+ max_active_paths=num_active_paths,
1380
+ )
1381
+
1382
+ return recognizer
1383
+
1384
+
1385
+ @lru_cache(maxsize=10)
1386
+ def _get_sherpa_onnx_nemo_ctc_models(
1387
+ repo_id: str,
1388
+ decoding_method: str,
1389
+ num_active_paths: int,
1390
+ ) -> sherpa_onnx.OfflineRecognizer:
1391
+ assert repo_id in [
1392
+ "csukuangfj/sherpa-onnx-nemo-parakeet_tdt_ctc_110m-en-36000",
1393
+ "csukuangfj/sherpa-onnx-nemo-stt_pt_fastconformer_hybrid_large_pc",
1394
+ "csukuangfj/sherpa-onnx-nemo-stt_pt_fastconformer_hybrid_large_pc-int8",
1395
+ "csukuangfj/sherpa-onnx-nemo-stt_de_fastconformer_hybrid_large_pc",
1396
+ "csukuangfj/sherpa-onnx-nemo-stt_de_fastconformer_hybrid_large_pc-int8",
1397
+ ], repo_id
1398
+
1399
+ if "int8" in repo_id:
1400
+ model = _get_nn_model_filename(
1401
+ repo_id=repo_id,
1402
+ filename="model.int8.onnx",
1403
+ subfolder=".",
1404
+ )
1405
+ else:
1406
+ model = _get_nn_model_filename(
1407
+ repo_id=repo_id,
1408
+ filename="model.onnx",
1409
+ subfolder=".",
1410
+ )
1411
+
1412
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1413
+
1414
+ recognizer = sherpa_onnx.OfflineRecognizer.from_nemo_ctc(
1415
+ tokens=tokens,
1416
+ model=model,
1417
+ num_threads=2,
1418
+ sample_rate=16000,
1419
+ feature_dim=80,
1420
+ )
1421
+
1422
+ return recognizer
1423
+
1424
+
1425
+ @lru_cache(maxsize=10)
1426
+ def _get_sherpa_onnx_offline_zipformer_pre_trained_model(
1427
+ repo_id: str,
1428
+ decoding_method: str,
1429
+ num_active_paths: int,
1430
+ ) -> sherpa_onnx.OfflineRecognizer:
1431
+ assert repo_id in [
1432
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-large",
1433
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-medium",
1434
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-small",
1435
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-large-punct-case",
1436
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-medium-punct-case",
1437
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-small-punct-case",
1438
+ ], repo_id
1439
+
1440
+ if repo_id == "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-large":
1441
+ epoch = 16
1442
+ avg = 3
1443
+ elif repo_id == "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-medium":
1444
+ epoch = 60
1445
+ avg = 20
1446
+ elif repo_id == "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-small":
1447
+ epoch = 90
1448
+ avg = 20
1449
+ elif (
1450
+ repo_id
1451
+ == "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-large-punct-case"
1452
+ ):
1453
+ epoch = 16
1454
+ avg = 2
1455
+ elif (
1456
+ repo_id
1457
+ == "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-medium-punct-case"
1458
+ ):
1459
+ epoch = 50
1460
+ avg = 15
1461
+ elif (
1462
+ repo_id
1463
+ == "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-small-punct-case"
1464
+ ):
1465
+ epoch = 88
1466
+ avg = 41
1467
+
1468
+ encoder_model = _get_nn_model_filename(
1469
+ repo_id=repo_id,
1470
+ filename=f"encoder-epoch-{epoch}-avg-{avg}.int8.onnx",
1471
+ subfolder=".",
1472
+ )
1473
+
1474
+ decoder_model = _get_nn_model_filename(
1475
+ repo_id=repo_id,
1476
+ filename=f"decoder-epoch-{epoch}-avg-{avg}.onnx",
1477
+ subfolder=".",
1478
+ )
1479
+
1480
+ joiner_model = _get_nn_model_filename(
1481
+ repo_id=repo_id,
1482
+ filename=f"joiner-epoch-{epoch}-avg-{avg}.int8.onnx",
1483
+ subfolder=".",
1484
+ )
1485
+
1486
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1487
+
1488
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
1489
+ tokens=tokens,
1490
+ encoder=encoder_model,
1491
+ decoder=decoder_model,
1492
+ joiner=joiner_model,
1493
+ num_threads=2,
1494
+ sample_rate=16000,
1495
+ feature_dim=80,
1496
+ decoding_method=decoding_method,
1497
+ max_active_paths=num_active_paths,
1498
+ )
1499
+
1500
+ return recognizer
1501
+
1502
+
1503
+ @lru_cache(maxsize=10)
1504
+ def _get_streaming_zipformer_ctc_pre_trained_model(
1505
+ repo_id: str,
1506
+ decoding_method: str,
1507
+ num_active_paths: int,
1508
+ ) -> sherpa_onnx.OnlineRecognizer:
1509
+ assert repo_id in [
1510
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-int8-2025-06-30",
1511
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-2025-06-30",
1512
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-fp16-2025-06-30",
1513
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-xlarge-int8-2025-06-30",
1514
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-xlarge-fp16-2025-06-30",
1515
+ ], repo_id
1516
+
1517
+ if repo_id in (
1518
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-int8-2025-06-30",
1519
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-xlarge-int8-2025-06-30",
1520
+ ):
1521
+ model = _get_nn_model_filename(
1522
+ repo_id=repo_id,
1523
+ filename="model.int8.onnx",
1524
+ subfolder=".",
1525
+ )
1526
+ elif repo_id in (
1527
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-fp16-2025-06-30",
1528
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-xlarge-fp16-2025-06-30",
1529
+ ):
1530
+ model = _get_nn_model_filename(
1531
+ repo_id=repo_id,
1532
+ filename="model.fp16.onnx",
1533
+ subfolder=".",
1534
+ )
1535
+ elif repo_id in ("csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-2025-06-30",):
1536
+ model = _get_nn_model_filename(
1537
+ repo_id=repo_id,
1538
+ filename="model.onnx",
1539
+ subfolder=".",
1540
+ )
1541
+
1542
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1543
+
1544
+ recognizer = sherpa_onnx.OnlineRecognizer.from_zipformer2_ctc(
1545
+ tokens=tokens,
1546
+ model=model,
1547
+ num_threads=2,
1548
+ sample_rate=16000,
1549
+ feature_dim=80,
1550
+ )
1551
+
1552
+ return recognizer
1553
+
1554
+
1555
+ @lru_cache(maxsize=10)
1556
+ def _get_non_streaming_zipformer_ctc_pre_trained_model(
1557
+ repo_id: str,
1558
+ decoding_method: str,
1559
+ num_active_paths: int,
1560
+ ) -> sherpa_onnx.OfflineRecognizer:
1561
+ assert repo_id in [
1562
+ "csukuangfj/sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03",
1563
+ "csukuangfj/sherpa-onnx-zipformer-ctc-zh-2025-07-03",
1564
+ "csukuangfj/sherpa-onnx-zipformer-ctc-small-zh-int8-2025-07-16",
1565
+ ], repo_id
1566
+
1567
+ if "int8" in repo_id:
1568
+ model = _get_nn_model_filename(
1569
+ repo_id=repo_id,
1570
+ filename="model.int8.onnx",
1571
+ subfolder=".",
1572
+ )
1573
+ else:
1574
+ model = _get_nn_model_filename(
1575
+ repo_id=repo_id,
1576
+ filename="model.onnx",
1577
+ subfolder=".",
1578
+ )
1579
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1580
+
1581
+ recognizer = sherpa_onnx.OfflineRecognizer.from_zipformer_ctc(
1582
+ tokens=tokens,
1583
+ model=model,
1584
+ num_threads=2,
1585
+ sample_rate=16000,
1586
+ feature_dim=80,
1587
+ )
1588
+
1589
+ return recognizer
1590
+
1591
+
1592
+ @lru_cache(maxsize=10)
1593
+ def _get_streaming_zipformer_pre_trained_model(
1594
+ repo_id: str,
1595
+ decoding_method: str,
1596
+ num_active_paths: int,
1597
+ ) -> sherpa_onnx.OnlineRecognizer:
1598
+ assert repo_id in [
1599
+ "csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20",
1600
+ "k2-fsa/sherpa-onnx-streaming-zipformer-korean-2024-06-16",
1601
+ ], repo_id
1602
+
1603
+ encoder_model = _get_nn_model_filename(
1604
+ repo_id=repo_id,
1605
+ filename="encoder-epoch-99-avg-1.onnx",
1606
+ subfolder=".",
1607
+ )
1608
+
1609
+ decoder_model = _get_nn_model_filename(
1610
+ repo_id=repo_id,
1611
+ filename="decoder-epoch-99-avg-1.onnx",
1612
+ subfolder=".",
1613
+ )
1614
+
1615
+ joiner_model = _get_nn_model_filename(
1616
+ repo_id=repo_id,
1617
+ filename="joiner-epoch-99-avg-1.onnx",
1618
+ subfolder=".",
1619
+ )
1620
+
1621
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1622
+
1623
+ recognizer = sherpa_onnx.OnlineRecognizer.from_transducer(
1624
+ tokens=tokens,
1625
+ encoder=encoder_model,
1626
+ decoder=decoder_model,
1627
+ joiner=joiner_model,
1628
+ num_threads=2,
1629
+ sample_rate=16000,
1630
+ feature_dim=80,
1631
+ decoding_method=decoding_method,
1632
+ max_active_paths=num_active_paths,
1633
+ )
1634
+
1635
+ return recognizer
1636
+
1637
+
1638
+ @lru_cache(maxsize=10)
1639
+ def _get_japanese_pre_trained_model(
1640
+ repo_id: str,
1641
+ decoding_method: str,
1642
+ num_active_paths: int,
1643
+ ) -> sherpa.OnlineRecognizer:
1644
+ repo_id, kind = repo_id.rsplit("-", maxsplit=1)
1645
+
1646
+ assert repo_id in [
1647
+ "TeoWenShen/icefall-asr-csj-pruned-transducer-stateless7-streaming-230208"
1648
+ ], repo_id
1649
+ assert kind in ("fluent", "disfluent"), kind
1650
+
1651
+ encoder_model = _get_nn_model_filename(
1652
+ repo_id=repo_id, filename="encoder_jit_trace.pt", subfolder=f"exp_{kind}"
1653
+ )
1654
+
1655
+ decoder_model = _get_nn_model_filename(
1656
+ repo_id=repo_id, filename="decoder_jit_trace.pt", subfolder=f"exp_{kind}"
1657
+ )
1658
+
1659
+ joiner_model = _get_nn_model_filename(
1660
+ repo_id=repo_id, filename="joiner_jit_trace.pt", subfolder=f"exp_{kind}"
1661
+ )
1662
+
1663
+ tokens = _get_token_filename(repo_id=repo_id)
1664
+
1665
+ feat_config = sherpa.FeatureConfig()
1666
+ feat_config.fbank_opts.frame_opts.samp_freq = sample_rate
1667
+ feat_config.fbank_opts.mel_opts.num_bins = 80
1668
+ feat_config.fbank_opts.frame_opts.dither = 0
1669
+
1670
+ config = sherpa.OnlineRecognizerConfig(
1671
+ nn_model="",
1672
+ encoder_model=encoder_model,
1673
+ decoder_model=decoder_model,
1674
+ joiner_model=joiner_model,
1675
+ tokens=tokens,
1676
+ use_gpu=False,
1677
+ feat_config=feat_config,
1678
+ decoding_method=decoding_method,
1679
+ num_active_paths=num_active_paths,
1680
+ chunk_size=32,
1681
+ )
1682
+
1683
+ recognizer = sherpa.OnlineRecognizer(config)
1684
+
1685
+ return recognizer
1686
+
1687
+
1688
+ @lru_cache(maxsize=10)
1689
+ def _get_gigaspeech_pre_trained_model_onnx(
1690
+ repo_id: str,
1691
+ decoding_method: str,
1692
+ num_active_paths: int,
1693
+ ) -> sherpa_onnx.OfflineRecognizer:
1694
+ assert repo_id in [
1695
+ "yfyeung/icefall-asr-gigaspeech-zipformer-2023-10-17",
1696
+ ], repo_id
1697
+
1698
+ encoder_model = _get_nn_model_filename(
1699
+ repo_id=repo_id,
1700
+ filename="encoder-epoch-30-avg-9.onnx",
1701
+ subfolder="exp",
1702
+ )
1703
+
1704
+ decoder_model = _get_nn_model_filename(
1705
+ repo_id=repo_id,
1706
+ filename="decoder-epoch-30-avg-9.onnx",
1707
+ subfolder="exp",
1708
+ )
1709
+
1710
+ joiner_model = _get_nn_model_filename(
1711
+ repo_id=repo_id,
1712
+ filename="joiner-epoch-30-avg-9.onnx",
1713
+ subfolder="exp",
1714
+ )
1715
+
1716
+ tokens = _get_token_filename(repo_id=repo_id, subfolder="data/lang_bpe_500")
1717
+
1718
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
1719
+ tokens=tokens,
1720
+ encoder=encoder_model,
1721
+ decoder=decoder_model,
1722
+ joiner=joiner_model,
1723
+ num_threads=2,
1724
+ sample_rate=16000,
1725
+ feature_dim=80,
1726
+ decoding_method=decoding_method,
1727
+ max_active_paths=num_active_paths,
1728
+ )
1729
+
1730
+ return recognizer
1731
+
1732
+
1733
+ @lru_cache(maxsize=10)
1734
+ def _get_streaming_paraformer_zh_yue_en_pre_trained_model(
1735
+ repo_id: str,
1736
+ decoding_method: str,
1737
+ num_active_paths: int,
1738
+ ) -> sherpa_onnx.OnlineRecognizer:
1739
+ assert repo_id in [
1740
+ "csukuangfj/sherpa-onnx-streaming-paraformer-trilingual-zh-cantonese-en",
1741
+ ], repo_id
1742
+
1743
+ encoder_model = _get_nn_model_filename(
1744
+ repo_id=repo_id,
1745
+ filename="encoder.int8.onnx",
1746
+ subfolder=".",
1747
+ )
1748
+
1749
+ decoder_model = _get_nn_model_filename(
1750
+ repo_id=repo_id,
1751
+ filename="decoder.int8.onnx",
1752
+ subfolder=".",
1753
+ )
1754
+
1755
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1756
+
1757
+ recognizer = sherpa_onnx.OnlineRecognizer.from_paraformer(
1758
+ tokens=tokens,
1759
+ encoder=encoder_model,
1760
+ decoder=decoder_model,
1761
+ num_threads=2,
1762
+ sample_rate=16000,
1763
+ feature_dim=80,
1764
+ decoding_method=decoding_method,
1765
+ )
1766
+
1767
+ return recognizer
1768
+
1769
+
1770
+ @lru_cache(maxsize=10)
1771
+ def _get_paraformer_en_pre_trained_model(
1772
+ repo_id: str,
1773
+ decoding_method: str,
1774
+ num_active_paths: int,
1775
+ ) -> sherpa_onnx.OfflineRecognizer:
1776
+ assert repo_id in [
1777
+ "yujinqiu/sherpa-onnx-paraformer-en-2023-10-24",
1778
+ ], repo_id
1779
+
1780
+ nn_model = _get_nn_model_filename(
1781
+ repo_id=repo_id,
1782
+ filename="model.int8.onnx",
1783
+ subfolder=".",
1784
+ )
1785
+
1786
+ tokens = _get_token_filename(
1787
+ repo_id=repo_id, filename="new_tokens.txt", subfolder="."
1788
+ )
1789
+
1790
+ recognizer = sherpa_onnx.OfflineRecognizer.from_paraformer(
1791
+ paraformer=nn_model,
1792
+ tokens=tokens,
1793
+ num_threads=2,
1794
+ sample_rate=sample_rate,
1795
+ feature_dim=80,
1796
+ decoding_method="greedy_search",
1797
+ debug=False,
1798
+ )
1799
+
1800
+ return recognizer
1801
+
1802
+
1803
+ @lru_cache(maxsize=5)
1804
+ def _get_chinese_dialect_models(
1805
+ repo_id: str, decoding_method: str, num_active_paths: int
1806
+ ) -> sherpa_onnx.OfflineRecognizer:
1807
+ assert repo_id in [
1808
+ "csukuangfj/sherpa-onnx-telespeech-ctc-int8-zh-2024-06-04",
1809
+ ], repo_id
1810
+
1811
+ nn_model = _get_nn_model_filename(
1812
+ repo_id=repo_id,
1813
+ filename="model.int8.onnx",
1814
+ subfolder=".",
1815
+ )
1816
+
1817
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1818
+
1819
+ recognizer = sherpa_onnx.OfflineRecognizer.from_telespeech_ctc(
1820
+ model=nn_model,
1821
+ tokens=tokens,
1822
+ num_threads=2,
1823
+ )
1824
+
1825
+ return recognizer
1826
+
1827
+
1828
+ @lru_cache(maxsize=10)
1829
+ def _get_sense_voice_pre_trained_model(
1830
+ repo_id: str,
1831
+ decoding_method: str,
1832
+ num_active_paths: int,
1833
+ ) -> sherpa_onnx.OfflineRecognizer:
1834
+ assert repo_id in [
1835
+ "csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",
1836
+ ], repo_id
1837
+
1838
+ nn_model = _get_nn_model_filename(
1839
+ repo_id=repo_id,
1840
+ filename="model.int8.onnx",
1841
+ subfolder=".",
1842
+ )
1843
+
1844
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1845
+
1846
+ recognizer = sherpa_onnx.OfflineRecognizer.from_sense_voice(
1847
+ model=nn_model,
1848
+ tokens=tokens,
1849
+ num_threads=2,
1850
+ sample_rate=sample_rate,
1851
+ feature_dim=80,
1852
+ decoding_method="greedy_search",
1853
+ debug=True,
1854
+ use_itn=True,
1855
+ )
1856
+
1857
+ return recognizer
1858
+
1859
+
1860
+ @lru_cache(maxsize=10)
1861
+ def _get_paraformer_pre_trained_model(
1862
+ repo_id: str,
1863
+ decoding_method: str,
1864
+ num_active_paths: int,
1865
+ ) -> sherpa_onnx.OfflineRecognizer:
1866
+ assert repo_id in [
1867
+ "csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28",
1868
+ "csukuangfj/sherpa-onnx-paraformer-zh-2024-03-09",
1869
+ "csukuangfj/sherpa-onnx-paraformer-zh-small-2024-03-09",
1870
+ "csukuangfj/sherpa-onnx-paraformer-trilingual-zh-cantonese-en",
1871
+ "csukuangfj/sherpa-onnx-paraformer-en-2024-03-09",
1872
+ ], repo_id
1873
+
1874
+ nn_model = _get_nn_model_filename(
1875
+ repo_id=repo_id,
1876
+ filename="model.int8.onnx",
1877
+ subfolder=".",
1878
+ )
1879
+
1880
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1881
+
1882
+ recognizer = sherpa_onnx.OfflineRecognizer.from_paraformer(
1883
+ paraformer=nn_model,
1884
+ tokens=tokens,
1885
+ num_threads=2,
1886
+ sample_rate=sample_rate,
1887
+ feature_dim=80,
1888
+ decoding_method="greedy_search",
1889
+ debug=False,
1890
+ )
1891
+
1892
+ return recognizer
1893
+
1894
+
1895
+ def _get_aishell_pre_trained_model(
1896
+ repo_id: str,
1897
+ decoding_method: str,
1898
+ num_active_paths: int,
1899
+ ) -> sherpa_onnx.OfflineRecognizer:
1900
+ assert repo_id in (
1901
+ "zrjin/icefall-asr-aishell-zipformer-large-2023-10-24",
1902
+ "zrjin/icefall-asr-aishell-zipformer-small-2023-10-24",
1903
+ "zrjin/icefall-asr-aishell-zipformer-2023-10-24",
1904
+ ), repo_id
1905
+ if repo_id == "zrjin/icefall-asr-aishell-zipformer-large-2023-10-24":
1906
+ epoch = 56
1907
+ avg = 23
1908
+ elif repo_id == "zrjin/icefall-asr-aishell-zipformer-small-2023-10-24":
1909
+ epoch = 55
1910
+ avg = 21
1911
+ elif repo_id == "zrjin/icefall-asr-aishell-zipformer-2023-10-24":
1912
+ epoch = 55
1913
+ avg = 17
1914
+
1915
+ encoder_model = _get_nn_model_filename(
1916
+ repo_id=repo_id,
1917
+ filename=f"encoder-epoch-{epoch}-avg-{avg}.onnx",
1918
+ subfolder="exp",
1919
+ )
1920
+
1921
+ decoder_model = _get_nn_model_filename(
1922
+ repo_id=repo_id,
1923
+ filename=f"decoder-epoch-{epoch}-avg-{avg}.onnx",
1924
+ subfolder="exp",
1925
+ )
1926
+
1927
+ joiner_model = _get_nn_model_filename(
1928
+ repo_id=repo_id,
1929
+ filename=f"joiner-epoch-{epoch}-avg-{avg}.onnx",
1930
+ subfolder="exp",
1931
+ )
1932
+
1933
+ tokens = _get_token_filename(repo_id=repo_id, subfolder="data/lang_char")
1934
+
1935
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
1936
+ tokens=tokens,
1937
+ encoder=encoder_model,
1938
+ decoder=decoder_model,
1939
+ joiner=joiner_model,
1940
+ num_threads=2,
1941
+ sample_rate=16000,
1942
+ feature_dim=80,
1943
+ decoding_method=decoding_method,
1944
+ max_active_paths=num_active_paths,
1945
+ )
1946
+
1947
+ return recognizer
1948
+
1949
+
1950
+ @lru_cache(maxsize=2)
1951
+ def get_punct_model() -> sherpa_onnx.OfflinePunctuation:
1952
+ model = _get_nn_model_filename(
1953
+ repo_id="csukuangfj/sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12",
1954
+ filename="model.onnx",
1955
+ subfolder=".",
1956
+ )
1957
+ config = sherpa_onnx.OfflinePunctuationConfig(
1958
+ model=sherpa_onnx.OfflinePunctuationModelConfig(ct_transformer=model),
1959
+ )
1960
+
1961
+ punct = sherpa_onnx.OfflinePunctuation(config)
1962
+ return punct
1963
+
1964
+
1965
+ def _get_multi_zh_hans_pre_trained_model(
1966
+ repo_id: str,
1967
+ decoding_method: str,
1968
+ num_active_paths: int,
1969
+ ) -> sherpa_onnx.OfflineRecognizer:
1970
+ assert repo_id in ("zrjin/sherpa-onnx-zipformer-multi-zh-hans-2023-9-2",), repo_id
1971
+
1972
+ encoder_model = _get_nn_model_filename(
1973
+ repo_id=repo_id,
1974
+ filename="encoder-epoch-20-avg-1.onnx",
1975
+ subfolder=".",
1976
+ )
1977
+
1978
+ decoder_model = _get_nn_model_filename(
1979
+ repo_id=repo_id,
1980
+ filename="decoder-epoch-20-avg-1.onnx",
1981
+ subfolder=".",
1982
+ )
1983
+
1984
+ joiner_model = _get_nn_model_filename(
1985
+ repo_id=repo_id,
1986
+ filename="joiner-epoch-20-avg-1.onnx",
1987
+ subfolder=".",
1988
+ )
1989
+
1990
+ tokens = _get_token_filename(repo_id=repo_id, subfolder=".")
1991
+
1992
+ recognizer = sherpa_onnx.OfflineRecognizer.from_transducer(
1993
+ tokens=tokens,
1994
+ encoder=encoder_model,
1995
+ decoder=decoder_model,
1996
+ joiner=joiner_model,
1997
+ num_threads=2,
1998
+ sample_rate=16000,
1999
+ feature_dim=80,
2000
+ decoding_method=decoding_method,
2001
+ max_active_paths=num_active_paths,
2002
+ )
2003
+
2004
+ return recognizer
2005
+
2006
+
2007
+ chinese_dialect_models = {
2008
+ "csukuangfj/sherpa-onnx-telespeech-ctc-int8-zh-2024-06-04": _get_chinese_dialect_models,
2009
+ }
2010
+
2011
+ chinese_models = {
2012
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-int8-2025-06-30": _get_streaming_zipformer_ctc_pre_trained_model,
2013
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-2025-06-30": _get_streaming_zipformer_ctc_pre_trained_model,
2014
+ # "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-fp16-2025-06-30": _get_streaming_zipformer_ctc_pre_trained_model,
2015
+ "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-xlarge-int8-2025-06-30": _get_streaming_zipformer_ctc_pre_trained_model,
2016
+ # "csukuangfj/sherpa-onnx-streaming-zipformer-ctc-zh-xlarge-fp16-2025-06-30": _get_streaming_zipformer_ctc_pre_trained_model,
2017
+ "csukuangfj/sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03": _get_non_streaming_zipformer_ctc_pre_trained_model,
2018
+ "csukuangfj/sherpa-onnx-zipformer-ctc-zh-2025-07-03": _get_non_streaming_zipformer_ctc_pre_trained_model,
2019
+ "csukuangfj/sherpa-onnx-zipformer-ctc-small-zh-int8-2025-07-16": _get_non_streaming_zipformer_ctc_pre_trained_model,
2020
+ "csukuangfj/sherpa-onnx-paraformer-zh-2024-03-09": _get_paraformer_pre_trained_model,
2021
+ "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2": _get_wenetspeech_pre_trained_model, # noqa
2022
+ "csukuangfj/sherpa-onnx-paraformer-zh-small-2024-03-09": _get_paraformer_pre_trained_model,
2023
+ "zrjin/sherpa-onnx-zipformer-multi-zh-hans-2023-9-2": _get_multi_zh_hans_pre_trained_model, # noqa
2024
+ "zrjin/icefall-asr-aishell-zipformer-large-2023-10-24": _get_aishell_pre_trained_model, # noqa
2025
+ "zrjin/icefall-asr-aishell-zipformer-small-2023-10-24": _get_aishell_pre_trained_model, # noqa
2026
+ "zrjin/icefall-asr-aishell-zipformer-2023-10-24": _get_aishell_pre_trained_model, # noqa
2027
+ "desh2608/icefall-asr-alimeeting-pruned-transducer-stateless7": _get_alimeeting_pre_trained_model,
2028
+ "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12": _get_aishell2_pretrained_model, # noqa
2029
+ "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12": _get_aishell2_pretrained_model, # noqa
2030
+ "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2": _get_aidatatang_200zh_pretrained_mode, # noqa
2031
+ "luomingshuang/icefall_asr_alimeeting_pruned_transducer_stateless2": _get_alimeeting_pre_trained_model, # noqa
2032
+ "csukuangfj/wenet-chinese-model": _get_wenet_model,
2033
+ # "csukuangfj/icefall-asr-wenetspeech-lstm-transducer-stateless-2022-10-14": _get_lstm_transducer_model,
2034
+ }
2035
+
2036
+ english_models = {
2037
+ "csukuangfj/sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8": _get_sherpa_onnx_nemo_transducer_models_int8,
2038
+ "whisper-tiny.en": _get_whisper_model,
2039
+ "moonshine-tiny": _get_moonshine_model,
2040
+ "moonshine-base": _get_moonshine_model,
2041
+ "whisper-base.en": _get_whisper_model,
2042
+ "whisper-small.en": _get_whisper_model,
2043
+ "csukuangfj/sherpa-onnx-nemo-parakeet_tdt_ctc_110m-en-36000": _get_sherpa_onnx_nemo_ctc_models,
2044
+ "csukuangfj/sherpa-onnx-nemo-parakeet_tdt_transducer_110m-en-36000": _get_sherpa_onnx_nemo_transducer_models,
2045
+ # "whisper-medium.en": _get_whisper_model,
2046
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-large": _get_sherpa_onnx_offline_zipformer_pre_trained_model,
2047
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-medium": _get_sherpa_onnx_offline_zipformer_pre_trained_model,
2048
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230926-small": _get_sherpa_onnx_offline_zipformer_pre_trained_model,
2049
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-large-punct-case": _get_sherpa_onnx_offline_zipformer_pre_trained_model,
2050
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-medium-punct-case": _get_sherpa_onnx_offline_zipformer_pre_trained_model,
2051
+ "csukuangfj/sherpa-onnx-zipformer-en-libriheavy-20230830-small-punct-case": _get_sherpa_onnx_offline_zipformer_pre_trained_model,
2052
+ "csukuangfj/sherpa-onnx-paraformer-en-2024-03-09": _get_paraformer_pre_trained_model,
2053
+ "yfyeung/icefall-asr-gigaspeech-zipformer-2023-10-17": _get_gigaspeech_pre_trained_model_onnx, # noqa
2054
+ "wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2": _get_gigaspeech_pre_trained_model, # noqa
2055
+ "yfyeung/icefall-asr-multidataset-pruned_transducer_stateless7-2023-05-04": _get_english_model, # noqa
2056
+ "yfyeung/icefall-asr-finetune-mux-pruned_transducer_stateless7-2023-05-19": _get_english_model, # noqa
2057
+ "WeijiZhuang/icefall-asr-librispeech-pruned-transducer-stateless8-2022-12-02": _get_english_model, # noqa
2058
+ "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless8-2022-11-14": _get_english_model, # noqa
2059
+ "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11": _get_english_model, # noqa
2060
+ "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13": _get_english_model, # noqa
2061
+ "yujinqiu/sherpa-onnx-paraformer-en-2023-10-24": _get_paraformer_en_pre_trained_model,
2062
+ "Zengwei/icefall-asr-librispeech-zipformer-large-2023-05-16": _get_english_model, # noqa
2063
+ "Zengwei/icefall-asr-librispeech-zipformer-2023-05-15": _get_english_model, # noqa
2064
+ "Zengwei/icefall-asr-librispeech-zipformer-small-2023-05-16": _get_english_model, # noqa
2065
+ "videodanchik/icefall-asr-tedlium3-conformer-ctc2": _get_english_model,
2066
+ "pkufool/icefall_asr_librispeech_conformer_ctc": _get_english_model,
2067
+ "WayneWiser/icefall-asr-librispeech-conformer-ctc2-jit-bpe-500-2022-07-21": _get_english_model,
2068
+ "csukuangfj/wenet-english-model": _get_wenet_model,
2069
+ }
2070
+
2071
+ multi_lingual_models = {
2072
+ "csukuangfj/sherpa-onnx-dolphin-base-ctc-multi-lang-int8-2025-04-02": _get_dolphin_ctc_models,
2073
+ "csukuangfj/sherpa-onnx-dolphin-small-ctc-multi-lang-int8-2025-04-02": _get_dolphin_ctc_models,
2074
+ "csukuangfj/sherpa-onnx-dolphin-base-ctc-multi-lang-2025-04-02": _get_dolphin_ctc_models,
2075
+ "csukuangfj/sherpa-onnx-dolphin-small-ctc-multi-lang-2025-04-02": _get_dolphin_ctc_models,
2076
+ }
2077
+
2078
+ chinese_english_mixed_models = {
2079
+ "csukuangfj/sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16": _get_fire_red_asr_models,
2080
+ "csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20": _get_streaming_zipformer_pre_trained_model,
2081
+ "zrjin/icefall-asr-zipformer-multi-zh-en-2023-11-22": _get_chinese_english_mixed_model_onnx,
2082
+ "csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28": _get_paraformer_pre_trained_model,
2083
+ "ptrnull/icefall-asr-conv-emformer-transducer-stateless2-zh": _get_chinese_english_mixed_model,
2084
+ "luomingshuang/icefall_asr_tal-csasr_pruned_transducer_stateless5": _get_chinese_english_mixed_model, # noqa
2085
+ }
2086
+
2087
+ tibetan_models = {
2088
+ "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless7-2022-12-02": _get_tibetan_pre_trained_model, # noqa
2089
+ "syzym/icefall-asr-xbmu-amdo31-pruned-transducer-stateless5-2022-11-29": _get_tibetan_pre_trained_model, # noqa
2090
+ }
2091
+
2092
+ arabic_models = {
2093
+ "AmirHussein/icefall-asr-mgb2-conformer_ctc-2022-27-06": _get_arabic_pre_trained_model, # noqa
2094
+ }
2095
+
2096
+ german_models = {
2097
+ "csukuangfj/sherpa-onnx-nemo-transducer-stt_de_fastconformer_hybrid_large_pc": _get_sherpa_onnx_nemo_transducer_models,
2098
+ "csukuangfj/sherpa-onnx-nemo-transducer-stt_de_fastconformer_hybrid_large_pc-int8": _get_sherpa_onnx_nemo_transducer_models_int8,
2099
+ "csukuangfj/sherpa-onnx-nemo-stt_de_fastconformer_hybrid_large_pc": _get_sherpa_onnx_nemo_ctc_models,
2100
+ "csukuangfj/sherpa-onnx-nemo-stt_de_fastconformer_hybrid_large_pc-int8": _get_sherpa_onnx_nemo_ctc_models,
2101
+ "csukuangfj/wav2vec2.0-torchaudio": _get_german_pre_trained_model,
2102
+ }
2103
+
2104
+ french_models = {
2105
+ "shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14": _get_french_pre_trained_model,
2106
+ }
2107
+
2108
+ japanese_models = {
2109
+ "reazon-research/reazonspeech-k2-v2": _get_offline_pre_trained_model,
2110
+ # "TeoWenShen/icefall-asr-csj-pruned-transducer-stateless7-streaming-230208-fluent": _get_japanese_pre_trained_model,
2111
+ # "TeoWenShen/icefall-asr-csj-pruned-transducer-stateless7-streaming-230208-disfluent": _get_japanese_pre_trained_model,
2112
+ }
2113
+
2114
+ russian_models = {
2115
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-v2-russian-2025-04-19": _get_russian_pre_trained_model,
2116
+ "csukuangfj/sherpa-onnx-nemo-ctc-giga-am-v2-russian-2025-04-19": _get_russian_pre_trained_model_ctc,
2117
+ "csukuangfj/sherpa-onnx-nemo-transducer-giga-am-russian-2024-10-24": _get_russian_pre_trained_model,
2118
+ "csukuangfj/sherpa-onnx-nemo-ctc-giga-am-russian-2024-10-24": _get_russian_pre_trained_model_ctc,
2119
+ "alphacep/vosk-model-ru": _get_russian_pre_trained_model,
2120
+ "alphacep/vosk-model-small-ru": _get_russian_pre_trained_model,
2121
+ }
2122
+
2123
+ chinese_cantonese_english_models = {
2124
+ "csukuangfj/sherpa-onnx-paraformer-trilingual-zh-cantonese-en": _get_paraformer_pre_trained_model,
2125
+ "csukuangfj/sherpa-onnx-streaming-paraformer-trilingual-zh-cantonese-en": _get_streaming_paraformer_zh_yue_en_pre_trained_model,
2126
+ }
2127
+
2128
+ chinese_cantonese_english_japanese_korean_models = {
2129
+ "csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17": _get_sense_voice_pre_trained_model,
2130
+ }
2131
+
2132
+ cantonese_models = {
2133
+ "zrjin/icefall-asr-mdcc-zipformer-2024-03-11": _get_zrjin_cantonese_pre_trained_model,
2134
+ }
2135
+
2136
+ korean_models = {
2137
+ "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24": _get_offline_pre_trained_model,
2138
+ "k2-fsa/sherpa-onnx-streaming-zipformer-korean-2024-06-16": _get_streaming_zipformer_pre_trained_model,
2139
+ }
2140
+
2141
+ thai_models = {
2142
+ "yfyeung/icefall-asr-gigaspeech2-th-zipformer-2024-06-20": _get_yifan_thai_pretrained_model,
2143
+ }
2144
+
2145
+ vietnamese_models = {
2146
+ "hynt/sherpa-onnx-zipformer-vi-int8-2025-10-16": _get_vietnamese_pretrained_model,
2147
+ "hynt/sherpa-onnx-zipformer-vi-2025-10-16": _get_vietnamese_pretrained_model,
2148
+ }
2149
+
2150
+ portuguese_brazlian_models = {
2151
+ "csukuangfj/sherpa-onnx-nemo-stt_pt_fastconformer_hybrid_large_pc": _get_sherpa_onnx_nemo_ctc_models,
2152
+ "csukuangfj/sherpa-onnx-nemo-stt_pt_fastconformer_hybrid_large_pc-int8": _get_sherpa_onnx_nemo_ctc_models,
2153
+ "csukuangfj/sherpa-onnx-nemo-transducer-stt_pt_fastconformer_hybrid_large_pc": _get_sherpa_onnx_nemo_transducer_models,
2154
+ "csukuangfj/sherpa-onnx-nemo-transducer-stt_pt_fastconformer_hybrid_large_pc-int8": _get_sherpa_onnx_nemo_transducer_models_int8,
2155
+ }
2156
+
2157
+
2158
+ all_models = {
2159
+ **multi_lingual_models,
2160
+ **chinese_models,
2161
+ **english_models,
2162
+ **chinese_english_mixed_models,
2163
+ **chinese_cantonese_english_models,
2164
+ **chinese_cantonese_english_japanese_korean_models,
2165
+ **cantonese_models,
2166
+ **japanese_models,
2167
+ **tibetan_models,
2168
+ **arabic_models,
2169
+ **german_models,
2170
+ **french_models,
2171
+ **russian_models,
2172
+ **korean_models,
2173
+ **thai_models,
2174
+ **vietnamese_models,
2175
+ **portuguese_brazlian_models,
2176
+ }
2177
+
2178
+ language_to_models = {
2179
+ # "Multi-lingual (east aisa)": list(multi_lingual_models.keys()),
2180
+ # "超多种中文方言": list(chinese_dialect_models.keys()),
2181
+ # "Chinese": list(chinese_models.keys()),
2182
+ # "English": list(english_models.keys()),
2183
+ # "Chinese+English": list(chinese_english_mixed_models.keys()),
2184
+ # "Chinese+English+Cantonese": list(chinese_cantonese_english_models.keys()),
2185
+ # "Chinese+English+Cantonese+Japanese+Korean": list(
2186
+ # chinese_cantonese_english_japanese_korean_models.keys()
2187
+ # ),
2188
+ # "Arabic": list(arabic_models.keys()),
2189
+ # "Cantonese": list(cantonese_models.keys()),
2190
+ # "French": list(french_models.keys()),
2191
+ # "German": list(german_models.keys()),
2192
+ # "Japanese": list(japanese_models.keys()),
2193
+ # "Korean": list(korean_models.keys()),
2194
+ # "Portuguese (Brazil)": list(portuguese_brazlian_models.keys()),
2195
+ # "Russian": list(russian_models.keys()),
2196
+ # "Thai": list(thai_models.keys()),
2197
+ # "Tibetan": list(tibetan_models.keys()),
2198
+ "Vietnamese": list(vietnamese_models.keys()),
2199
+ }
packages.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ ffmpeg
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ gradio
2
+ pydub
3
+ sherpa-onnx
4
+ numpy
5
+ huggingface_hub