Skip to content

Commit 51d7895

Browse files
committed
Add faroese and fix no default model
1 parent dab5e90 commit 51d7895

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

public/faroese.flac

176 KB
Binary file not shown.

src/utils/Constants.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,18 @@ export const MODELS: { [key: string]: [string, string] } = {
143143
"PierreMesure/nb-whisper-tiny-onnx": ["nb-whisper-tiny", "no"],
144144
"PierreMesure/nb-whisper-base-onnx": ["nb-whisper-base", "no"],
145145
"PierreMesure/nb-whisper-small-onnx": ["nb-whisper-small", "no"],
146+
"PierreMesure/whisper-tiny-faroese-8k-steps-100h-ONNX": [
147+
"whisper-tiny-faroese",
148+
"fo",
149+
],
150+
"PierreMesure/whisper-base-faroese-8k-steps-100h-ONNX": [
151+
"whisper-base-faroese",
152+
"fo",
153+
],
154+
"PierreMesure/whisper-small-faroese-5k-steps-100h-ONNX": [
155+
"whisper-small-faroese",
156+
"fo",
157+
],
146158
};
147159

148160
export const DTYPES: string[] = [
@@ -172,6 +184,8 @@ function getDefaultAudioUrl(language: string): string {
172184
return "https://raw.githubusercontent.com/NbAiLab/nb-whisper/main/audio/king.mp3";
173185
case "es":
174186
return "https://raw.githubusercontent.com/PierreMesure/whisper-web/refs/heads/main/public/espanol.mp3";
187+
case "fo":
188+
return "https://raw.githubusercontent.com/PierreMesure/whisper-web/refs/heads/main/public/faroese.flac";
175189
default:
176190
return `https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/${
177191
isMobileOrTablet ? "jfk" : "ted_60_16k"
@@ -186,7 +200,11 @@ function getDefaultModel(language: string): string {
186200
case "no":
187201
return `PierreMesure/nb-whisper-${
188202
isMobileOrTablet ? "tiny" : "base"
189-
}`;
203+
}-onnx`;
204+
case "fo":
205+
return `PierreMesure/whisper-${
206+
isMobileOrTablet ? "tiny" : "base"
207+
}-faroese-8k-steps-100h-ONNX`;
190208
default:
191209
return `onnx-community/whisper-${
192210
isMobileOrTablet ? "tiny" : "base"

0 commit comments

Comments
 (0)