{"id":256,"date":"2016-07-05T17:23:14","date_gmt":"2016-07-05T17:23:14","guid":{"rendered":"http:\/\/uscictdialdev.wpenginepowered.com\/?page_id=256"},"modified":"2017-05-23T23:55:01","modified_gmt":"2017-05-23T23:55:01","slug":"responsivevoice-js","status":"publish","type":"page","link":"https:\/\/dialport.ict.usc.edu\/index.php\/resources\/text-to-speech-tools\/responsivevoice-js\/","title":{"rendered":"ResponsiveVoice.JS"},"content":{"rendered":"<p><a href=\"http:\/\/responsivevoice.org\/api\/\">ResponsiveVoice<\/a> is a HTML5-based Text-To-Speech library designed to add voice features to web sites and apps across all smartphone, tablet and desktop devices. It supports 51 languages through 168 voices, no dependencies and weighs just 14kb.<\/p>\n<p>&nbsp;<\/p>\n<h3>How to Use<\/h3>\n<p>To include ResponsiveVoice on an HTML page, just add this script tag to the &lt;head&gt; section:<\/p>\n<blockquote><p><em><span class=\"crayon-ta\">&lt;script <\/span><span class=\"crayon-e \">src<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;http:\/\/code.responsivevoice.org\/responsivevoice.js&#8221;<\/span><span class=\"crayon-o\">&gt;<\/span><span class=\"crayon-ta\">&lt;\/script&gt;<\/span><\/em><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>To get ResponsiveVoice to speak a sentence, all it requires is a string of text:<\/p>\n<blockquote><p><em><span class=\"crayon-v\">responsiveVoice<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">speak<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-s\">&#8220;hello world&#8221;<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">;<\/span><\/em><\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p>The .speak() function also supports other parameters such as the speaker, volume, pitch, and rate:<\/p>\n<blockquote><p><em><span class=\"crayon-v\">responsiveVoice<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">speak<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-s\">&#8220;hello world&#8221;<\/span><span class=\"crayon-sy\">,<\/span> <span class=\"crayon-s\">&#8220;UK English Male&#8221;<\/span><span class=\"crayon-sy\">,<\/span> <span class=\"crayon-sy\">{<\/span><span class=\"crayon-v\">pitch<\/span><span class=\"crayon-o\">:<\/span> <span class=\"crayon-cn\">2<\/span><span class=\"crayon-sy\">}<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">;<\/span><\/em><\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p>There are also various other functions associated with ResponsiveVoice, such as cancel(), pause(), resume(), isPlaying(), etc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ResponsiveVoice is a HTML5-based Text-To-Speech library designed to add voice features to web sites and apps across all smartphone, tablet and desktop devices. It supports 51 languages through 168 voices, no dependencies and weighs just 14kb. &nbsp; How to Use To include ResponsiveVoice on an HTML page, just add this script tag to the &lt;head&gt; [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"parent":34,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-256","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/pages\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/comments?post=256"}],"version-history":[{"count":0,"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/pages\/256\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/pages\/34"}],"wp:attachment":[{"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/media?parent=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}