Skip to content

Commit

Permalink
Update tuesday_visual.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirilllive committed Sep 4, 2023
1 parent 2c23700 commit 7d530a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tuesday_visual.html
Original file line number Diff line number Diff line change
Expand Up @@ -2908,7 +2908,7 @@
}
function voicesSynthesis(l,t,a,d){
let v="",voices=speechSynthesis.getVoices(),s=document.getElementById(t).value.split(",").map((item)=>{return item.trim()});
voices.forEach(function(voice,i){if(l==voice.lang.substring(0,2)){v+="<tr><td style='width:60px;' align='center'><label class='switchbox'><input type='checkbox' class='chec_plugin' value='"+voice.name+"' "+((s.includes(voice.name))?"checked":"")+"><span class='toggle round'></span></label> </td><td>"+voice.name+"</td><td class='icon_m icon_audio_play' style='height:40px;width:40px;' onclick='speak(\""+((d.length>0)?d:"Hello")+"\",\""+voice.name+"\")'></td></tr>"}});
voices.forEach(function(voice,i){if(l==voice.lang.substring(0,2)){v+="<tr><td style='width:60px;' align='center'><label class='switchbox'><input type='checkbox' class='chec_plugin' value='"+voice.name+"' "+((s.includes(voice.name))?"checked":"")+"><span class='toggle round'></span></label> </td><td>"+voice.name+"</td><td class='icon_m icon_audio_play' style='height:40px;width:40px;' onclick='speak(\""+((d.length>0)?d.replaceAll("'","").replaceAll('"',''):"Hello")+"\",\""+voice.name+"\")'></td></tr>"}});
code='<div class="window" style="position:fixed;padding:8px;width:380px;"><div><div class="window_close icon icon_close" onclick="synth.cancel();menu_add.style.visibility=\'hidden\';" ></div></div><p>Voice selection</p> <br><hr style="margin:0;"><p class="text_tutorials_a select_tutorials">'+texts.tutorials[19].en+'</p> <div style="border-bottom:1px solid var(--cb);overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 120px);"><table id="all_voices" style="width: 100%;"><tbody>'+v+'</tbody></table></div>'
+'<br><table class="big_button" width="256px" onclick="synth.cancel();voicesSynthesis_apply(\''+l+'\',\''+t+'\','+a+');menu_add.style.visibility=\'hidden\';"><tbody><tr><td width="42px" class="icon icon_ok"></td><td align="center">Apply</td><td width="42px"></td></tr></tbody></table></div>'
menu_add.innerHTML=code;
Expand Down Expand Up @@ -2947,7 +2947,7 @@
play_speak.style.display="none";
}
}
function speak(text,v) {
function speak(text,v){
const speech = new SpeechSynthesisUtterance(text);
if (synth.speaking){synth.cancel()}
else{
Expand Down

0 comments on commit 7d530a1

Please sign in to comment.