Upload webapp/src/config.ts with huggingface_hub
Browse files- webapp/src/config.ts +46 -0
webapp/src/config.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const APP_CONFIG = {
|
| 2 |
+
appTitle: 'Finnish TTS Test App',
|
| 3 |
+
sampleText:
|
| 4 |
+
'Tervetuloa kokeilemaan hienoviritettyä suomenkielistä Chatterbox-puhesynteesiä.',
|
| 5 |
+
sampleRate: 24_000,
|
| 6 |
+
startSpeechToken: 6561,
|
| 7 |
+
stopSpeechToken: 6562,
|
| 8 |
+
startTextToken: 255,
|
| 9 |
+
stopTextToken: 0,
|
| 10 |
+
repetitionPenalty: 1.2,
|
| 11 |
+
temperature: 0.8,
|
| 12 |
+
exaggeration: 0.6,
|
| 13 |
+
cfgWeight: 0.5,
|
| 14 |
+
minP: 0.05,
|
| 15 |
+
minSpeechTokens: 40,
|
| 16 |
+
maxGenerationSteps: 800,
|
| 17 |
+
layerCount: 30,
|
| 18 |
+
hiddenSize: 1024,
|
| 19 |
+
attentionHeads: 16,
|
| 20 |
+
headSize: 64,
|
| 21 |
+
modelRepos: {
|
| 22 |
+
base: 'https://huggingface.co/onnx-community/chatterbox-multilingual-ONNX/resolve/main',
|
| 23 |
+
finnish: 'https://huggingface.co/RASMUS/Chatterbox-Finnish-ONNX/resolve/main',
|
| 24 |
+
},
|
| 25 |
+
paths: {
|
| 26 |
+
tokenizer: 'tokenizer.json',
|
| 27 |
+
referenceAudio: 'samples/reference_finnish.wav',
|
| 28 |
+
speechEncoderModel: 'onnx/speech_encoder.onnx',
|
| 29 |
+
speechEncoderData: 'speech_encoder.onnx_data',
|
| 30 |
+
embedTokensModel: 'onnx/embed_tokens.onnx',
|
| 31 |
+
embedTokensData: 'embed_tokens.onnx_data',
|
| 32 |
+
languageModel: 'onnx/language_model.onnx',
|
| 33 |
+
languageModelData: 'language_model.onnx_data',
|
| 34 |
+
conditionalDecoderModel: 'onnx/conditional_decoder.onnx',
|
| 35 |
+
conditionalDecoderData: 'conditional_decoder.onnx_data',
|
| 36 |
+
finnishCondEmb: 'onnx/finnish_cond_emb.bin',
|
| 37 |
+
},
|
| 38 |
+
} as const
|
| 39 |
+
|
| 40 |
+
export function getBaseUrl(path: string): string {
|
| 41 |
+
return `${APP_CONFIG.modelRepos.base}/${path}`
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
export function getFinnishUrl(path: string): string {
|
| 45 |
+
return `${APP_CONFIG.modelRepos.finnish}/${path}`
|
| 46 |
+
}
|