Jump to content

Recommended Posts

Posted
i want to speech a text in chrome browser ... i use:
 
unisession.AddJS(UTF8Encode('if ("speechSynthesis" in window) {var sagHallo = function() {var hallo = new SpeechSynthesisUtterance("'+unimainmodule.SILVANA_DB.FieldByName('TEXTAUSGABE').AsString+'");hallo.lang = "de-DE";window.speechSynthesis.speak(hallo);} }'));

.. can someone help?

 

thanx

erich

 
Posted

Hi,

 

Can you check whether there is in a string double quotes ?!:

unimainmodule.SILVANA_DB.FieldByName('TEXTAUSGABE').AsString

Best regards.

Posted

hi,

 

i collect the unigui-response ... what is going on when i start speech...

 

_rsov_(O340,40);O378.setText("");var hallo = new SpeechSynthesisUtterance("hello world"); hallo.lang = "de-DE"; window.speechSynthesis.speak(hallo);O378.setText("Irgendwas mit: \"hi\"");O378.setText("Irgendwas mit: \"hi\" ohne fixem Themen-Bezug");_ffc_(O340);_sfv_(O340,40,"");O358.update(" 
Silvana meint:
Halli hallo hallöchen :-)\n 
\n",true);

Posted

IT Works :-)  ... Now i use:

 

UniHTMLFrame1.HTML.Append('<script type="text/javascript">');
UniHTMLFrame1.HTML.Append('var worte = new SpeechSynthesisUtterance("hello world");');
UniHTMLFrame1.HTML.Append('worte.lang = "de-DE";');
UniHTMLFrame1.HTML.Append('window.speechSynthesis.speak(worte);');
UniHTMLFrame1.HTML.Append('</script>');
 
..its  funny and easy to use in chrome and safari 
 
hth
erich

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...