mcPear commited on
Commit
15b353a
·
verified ·
1 Parent(s): 3132ed5

Default temperature 1.0

Browse files
Files changed (3) hide show
  1. cleaner.js +1 -1
  2. english.js +1 -1
  3. index.html +4 -4
cleaner.js CHANGED
@@ -1,7 +1,7 @@
1
  // Browser port of matcha_patch/polish_cleaners.py + polish_mixed_cleaners: Polish text normalisation, espeak-ng (WASM) IPA,
2
  // English words in {braces} phonemized with the en-us voice, symbol ids. Must match the Python cleaners character for character.
3
  import { initialize, setVoice, getPhonemes } from "https://cdn.jsdelivr.net/npm/espeak-phonemizer@0.1.2/src/espeak.mjs";
4
- import { SYMBOL_TO_ID } from "./symbols.js?v=20261005a";
5
 
6
  const PL_WORD = "0-9a-ząćęłńóśźż";
7
  const esc = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
 
1
  // Browser port of matcha_patch/polish_cleaners.py + polish_mixed_cleaners: Polish text normalisation, espeak-ng (WASM) IPA,
2
  // English words in {braces} phonemized with the en-us voice, symbol ids. Must match the Python cleaners character for character.
3
  import { initialize, setVoice, getPhonemes } from "https://cdn.jsdelivr.net/npm/espeak-phonemizer@0.1.2/src/espeak.mjs";
4
+ import { SYMBOL_TO_ID } from "./symbols.js?v=20261005b";
5
 
6
  const PL_WORD = "0-9a-ząćęłńóśźż";
7
  const esc = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
english.js CHANGED
@@ -3,7 +3,7 @@
3
  // unlisted words; a frequency table is too big for the browser). Inflected forms whose full form is a common Polish word
4
  // (wina, legendy, deskę) are precomputed in english_data.json -> pl_inflected_block.
5
  let D = null;
6
- export async function initEnglish(url = new URL("./english_data.json?v=20261005a", import.meta.url)) {
7
  if (!D) {
8
  const j = await (await fetch(url)).json();
9
  D = { cur: new Set(j.curated), rap: new Set(j.read_as_polish), suf: j.suffixes, loan: j.loan_stems, block: new Set(j.pl_inflected_block) };
 
3
  // unlisted words; a frequency table is too big for the browser). Inflected forms whose full form is a common Polish word
4
  // (wina, legendy, deskę) are precomputed in english_data.json -> pl_inflected_block.
5
  let D = null;
6
+ export async function initEnglish(url = new URL("./english_data.json?v=20261005b", import.meta.url)) {
7
  if (!D) {
8
  const j = await (await fetch(url)).json();
9
  D = { cur: new Set(j.curated), rap: new Set(j.read_as_polish), suf: j.suffixes, loan: j.loan_stems, block: new Set(j.pl_inflected_block) };
index.html CHANGED
@@ -57,7 +57,7 @@ footer img{height:30px;display:block}
57
  <details><summary style="font-size:12px;color:var(--mut);cursor:pointer">advanced: pitch range, temperature, tempo, ODE steps, backend</summary>
58
  <div style="margin-top:8px;display:flex;flex-direction:column;gap:8px">
59
  <label class="f" style="margin:0" title="how much the pitch moves within a sentence (style token, normal tempo, statement)">Pitch range<select id="style"></select></label>
60
- <div class="knob"><span>temperature</span><input type="range" id="temperature" min="0" max="1.2" step="0.05" value="0.8" oninput="upd()"><b id="temperature_v"></b></div>
61
  <div class="knob"><span>tempo (length scale)</span><input type="range" id="length_scale" min="0.6" max="1.5" step="0.05" value="0.8" oninput="upd()"><b id="length_scale_v"></b></div>
62
  <details style="margin-top:2px"><summary style="font-size:12px;color:var(--mut);cursor:pointer">pronunciation dictionary</summary>
63
  <textarea id="lexicon" rows="4" spellcheck="false" style="width:100%;margin-top:6px;font-family:ui-monospace,monospace;font-size:12px" placeholder="word -> pronunciation, one per line"></textarea>
@@ -92,9 +92,9 @@ footer img{height:30px;display:block}
92
  <script>window.coi={coepCredentialless:()=>true}</script><script src="coi-serviceworker.js"></script>
93
  <script src="https://cdn.jsdelivr.net/npm/onnxruntime-web@1.30.0/dist/ort.all.min.js" crossorigin="anonymous"></script>
94
  <script type="module">
95
- import { textToIpa, ipaToIds, initPhonemizer } from "./cleaner.js?v=20261005a";
96
- import { initEnglish, markEnglish } from "./english.js?v=20261005a";
97
- import { EFFECTS, DEFAULTS, UI_DEFAULTS, applyChain } from "./effects.js?v=20261005a";
98
  const $=id=>document.getElementById(id); const SR=22050;
99
  const LOCAL = location.hostname==="localhost"||location.hostname==="127.0.0.1";
100
  const MODEL_BASE = LOCAL ? "/release-v2/" : "https://huggingface.co/machinekind/Matcha-TTS-PL-v2/resolve/main/";
 
57
  <details><summary style="font-size:12px;color:var(--mut);cursor:pointer">advanced: pitch range, temperature, tempo, ODE steps, backend</summary>
58
  <div style="margin-top:8px;display:flex;flex-direction:column;gap:8px">
59
  <label class="f" style="margin:0" title="how much the pitch moves within a sentence (style token, normal tempo, statement)">Pitch range<select id="style"></select></label>
60
+ <div class="knob"><span>temperature</span><input type="range" id="temperature" min="0" max="1.5" step="0.05" value="1.0" oninput="upd()"><b id="temperature_v"></b></div>
61
  <div class="knob"><span>tempo (length scale)</span><input type="range" id="length_scale" min="0.6" max="1.5" step="0.05" value="0.8" oninput="upd()"><b id="length_scale_v"></b></div>
62
  <details style="margin-top:2px"><summary style="font-size:12px;color:var(--mut);cursor:pointer">pronunciation dictionary</summary>
63
  <textarea id="lexicon" rows="4" spellcheck="false" style="width:100%;margin-top:6px;font-family:ui-monospace,monospace;font-size:12px" placeholder="word -> pronunciation, one per line"></textarea>
 
92
  <script>window.coi={coepCredentialless:()=>true}</script><script src="coi-serviceworker.js"></script>
93
  <script src="https://cdn.jsdelivr.net/npm/onnxruntime-web@1.30.0/dist/ort.all.min.js" crossorigin="anonymous"></script>
94
  <script type="module">
95
+ import { textToIpa, ipaToIds, initPhonemizer } from "./cleaner.js?v=20261005b";
96
+ import { initEnglish, markEnglish } from "./english.js?v=20261005b";
97
+ import { EFFECTS, DEFAULTS, UI_DEFAULTS, applyChain } from "./effects.js?v=20261005b";
98
  const $=id=>document.getElementById(id); const SR=22050;
99
  const LOCAL = location.hostname==="localhost"||location.hostname==="127.0.0.1";
100
  const MODEL_BASE = LOCAL ? "/release-v2/" : "https://huggingface.co/machinekind/Matcha-TTS-PL-v2/resolve/main/";