Kuachi commited on
Commit
f239173
1 Parent(s): b01b960
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -40,9 +40,9 @@ def create_tts_fn(net_g_ms, speaker_id):
40
  text = text.replace('\n', ' ').replace('\r', '').replace(" ", "")
41
  if limitation:
42
  text_len = len(re.sub("\[([A-Z]{2})\]", "", text))
43
- max_len = 100
44
  if is_symbol:
45
- max_len *= 3
46
  if text_len > max_len:
47
  return "Error: Text is too long", None
48
  if not is_symbol:
@@ -93,10 +93,10 @@ download_audio_js = """
93
  return;
94
  text = text.value;
95
  if (text == undefined)
96
- text = Math.floor(Math.random()*100000000);
97
  audio = audio.src;
98
  let oA = document.createElement("a");
99
- oA.download = text.substr(0, 20)+'.mp3';
100
  oA.href = audio;
101
  document.body.appendChild(oA);
102
  oA.click();
 
40
  text = text.replace('\n', ' ').replace('\r', '').replace(" ", "")
41
  if limitation:
42
  text_len = len(re.sub("\[([A-Z]{2})\]", "", text))
43
+ max_len = 9999999999999999999999999999
44
  if is_symbol:
45
+ max_len *= 99999999999999999999
46
  if text_len > max_len:
47
  return "Error: Text is too long", None
48
  if not is_symbol:
 
93
  return;
94
  text = text.value;
95
  if (text == undefined)
96
+ text = Math.floor(Math.random()*100000000000000000000000000000000000);
97
  audio = audio.src;
98
  let oA = document.createElement("a");
99
+ oA.download = text.substr(0, 200000000000000000)+'.mp3';
100
  oA.href = audio;
101
  document.body.appendChild(oA);
102
  oA.click();