{"id":3308,"date":"2014-07-02T18:16:27","date_gmt":"2014-07-02T09:16:27","guid":{"rendered":"http:\/\/pchero21.com\/?p=3291"},"modified":"2014-07-02T18:16:27","modified_gmt":"2014-07-02T09:16:27","slug":"freeswitch-tts-on-python","status":"publish","type":"post","link":"http:\/\/pchero21.com\/?p=3308","title":{"rendered":"[Freeswitch] TTS on python"},"content":{"rendered":"<p>Freeswitch \uc5d0\uc11c TTS \uc11c\ube44\uc2a4\ub97c \uc81c\uacf5\ud558\ub294 \ubc29\ubc95\uc740 \ud06c\uac8c \ub450\uac00\uc9c0\uac00 \uc788\ub2e4.<\/p>\n<p>1. Dialplan \uc5d0\uc11c \ud574\ub2f9 \ubaa8\ub4c8\uc744 \uc9c1\uc811 \ud638\ucd9c\ud558\ub294 \ubc29\ubc95.<br \/>\n2. Python, Lua \uc640 \uac19\uc740 \uc2a4\ud06c\ub9bd\ud2b8 \ubaa8\ub4c8\uc5d0\uc11c \ud638\ucd9c\ud558\ub294 \ubc29\ubc95<\/p>\n<p>\uc5ec\uae30\uc5d0\uc11c\ub294 Python \uc2a4\ud06c\ub9bd\ud2b8 \ubaa8\ub4c8\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 \ubc29\ubc95\uc744 \uae30\uc220\ud55c\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>mod_tts_commandline \uc744 \uc0ac\uc6a9\ud558\ub294 \ubc29\ubc95<\/strong><\/p>\n<p>Freeswitch \uc5d0\uc11c\ub294 TTS \uc11c\ube44\uc2a4\ub97c \uc704\ud574 \uc5ec\ub7ec\uac00\uc9c0 \ubaa8\ub4c8\ub4e4\uc744 \uc81c\uacf5\ud558\ub294\ub370, \uadf8 \uc911 mod_tts_commandline \ubaa8\ub4c8\uc740 \uc11c\ubc84\uc5d0 \uc124\uce58\ub418\uc5b4 \uc788\ub294 TTS \ud504\ub85c\uadf8\ub7a8\uacfc \uc5f0\ub3d9\ud558\uc5ec TTS \uc11c\ube44\uc2a4\ub97c \uc81c\uacf5\ud558\ub294 \ubaa8\ub4c8\uc774\ub2e4 .<\/p>\n<p>\uba3c\uc800 mod_tts_commandline \ubaa8\ub4c8\uc744 \uc124\uce58\ud558\uc790.<\/p>\n<blockquote><p>cd \/freeswitch\/souce\/directory<br \/>\nvi \ud3b8\uc9d1\uae30\ub85c modules.conf \ud30c\uc77c\uc5d0\uc11c asr_tts\/mod_tts_commandline \ubd80\ubd84\uc744 \uc8fc\uc11d \ud574\uc81c\ud558\uc790.<br \/>\n.\/configure &amp;&amp; make &amp;&amp; make install<\/p><\/blockquote>\n<p>\uc124\uce58\uac00 \ub05d\ub098\uba74, \ud574\ub2f9 \ubaa8\ub4c8\uc774 \uc790\ub3d9 \ub85c\ub4dc\ub420 \uc218 \uc788\ub3c4\ub85d \ud574\uc8fc\uc790.<\/p>\n<blockquote><p>vi \/freeswitch\/config_directory\/conf\/autoload_configs\/modules.conf.xml<br \/>\n&lt;load module=&#8221;mod_tts_commandline&#8221;\/&gt; \ubd80\ubd84\uc744 \uc8fc\uc11d\ud574\uc81c\ud574\uc8fc\uc790.<\/p><\/blockquote>\n<p>tts_commandline.conf.xml \ud30c\uc77c\uc744 \uc218\uc815\ud574\uc57c \ud55c\ub2e4. \uc5ec\ub7ec\uac00\uc9c0 \uba85\ub839\uc5b4 \uad6c\ubb38\ub4e4\uc774 \uac00\ub2a5\ud55c\ub370.. \ub2e4\uc74c\uc740 epseak \ub97c \uc0ac\uc6a9\ud55c \uc608\uc81c \uba85\ub839\uc5b4 \uad6c\ubb38\uc774\ub2e4.<\/p>\n<blockquote><p>&lt;param name=&#8221;command&#8221; value=&#8221;echo ${text} | espeak &#8211;stdin &#8211;stdout -v default| sox -t wav &#8211; -r ${rate} ${file}&#8221;\/&gt;<\/p><\/blockquote>\n<p>\uae30\ud0c0 \ub2e4\ub978 \uc608\uc2dc \uba85\ub839\uc5b4 \ubb38\uad6c\ub294 <a title=\"https:\/\/wiki.freeswitch.org\/wiki\/Mod_tts_commandline\" href=\"https:\/\/wiki.freeswitch.org\/wiki\/Mod_tts_commandline\" target=\"_blank\">https:\/\/wiki.freeswitch.org\/wiki\/Mod_tts_commandline <\/a>\uc5d0\uc11c \ud655\uc778\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>\uc774\ud6c4 Python \uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c \ub2e4\uc74c\uacfc \uac19\uc774 \ud638\ucd9c\ud558\uc5ec \uc0ac\uc6a9\ud558\uba74 \ub41c\ub2e4.<\/p>\n<pre class=\"brush:py\">session.set_tts_params(\"espeak\", \"default\");\nsession.speak(\"Hello, world!\");<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>mod_shout \ub97c \uc0ac\uc6a9\ud558\ub294 \ubc29\ubc95<\/strong><\/p>\n<p>\ubcf8\ub798, mod_shout \ub294 \uc678\ubd80 \uc790\uc6d0\uc744 \uc7ac\uc0dd\uc2dc\ud0a4\ub294 \ubaa8\ub4c8\uc774\ub2e4. \ud558\uc9c0\ub9cc \uc774\ub97c \uc774\uc6a9\ud558\uba74 \uc678\ubd80(\uc6f9)\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 TTS \uc11c\ube44\uc2a4\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4.<br \/>\n\uc678\ubd80(\uc6f9)\uc5d0\uc11c TTS \ub97c \uc81c\uacf5\ud558\ub294 \uacf3\uc740 \ud06c\uac8c, Bing\/Google \uc774 \uc788\ub294\ub370, \uc5ec\uae30\uc11c\ub294 Google \uc744 \uae30\uc900\uc73c\ub85c \uc124\uba85\ud55c\ub2e4.<\/p>\n<p>\uac04\ub2e8\ud558\ub2e4. mod_shout \uc124\uce58 \ud6c4, \ub2e4\uc74c\uacfc \uac19\uc774 \uc0ac\uc6a9\ud558\uba74 \ub41c\ub2e4.<\/p>\n<pre class=\"brush:py\">session.streamFile(\"shout:\/\/translate.google.com\/translate_tts?tl=en&amp;q=Hello+world\", \"\")\n# \ud639\uc740...\nrecvDtmf=session.playAndGetDigits(1, 1, 1, 1, \"\", \"shout:\/\/translate.google.com\/translate_tts?tl=en&amp;q=Hello+world\", \"\", \"\", \"\", 0, \"\")<\/pre>\n<p>&nbsp;<\/p>\n<p>\ucc38\uc870:<\/p>\n<p><a title=\"https:\/\/wiki.freeswitch.org\/wiki\/Mod_shout\" href=\"https:\/\/wiki.freeswitch.org\/wiki\/Mod_shout\" target=\"_blank\">https:\/\/wiki.freeswitch.org\/wiki\/Mod_shout<\/a><\/p>\n<p><a title=\"https:\/\/wiki.freeswitch.org\/wiki\/Session_streamFile\" href=\"https:\/\/wiki.freeswitch.org\/wiki\/Session_streamFile\" target=\"_blank\">https:\/\/wiki.freeswitch.org\/wiki\/Session_streamFile<\/a><\/p>\n<p><a title=\"https:\/\/wiki.freeswitch.org\/wiki\/Playing_recording_external_media\" href=\"https:\/\/wiki.freeswitch.org\/wiki\/Playing_recording_external_media\" target=\"_blank\">https:\/\/wiki.freeswitch.org\/wiki\/Playing_recording_external_media<\/a><\/p>\n<p><a title=\"https:\/\/wiki.freeswitch.org\/wiki\/Mod_tts_commandline\" href=\"https:\/\/wiki.freeswitch.org\/wiki\/Mod_tts_commandline\" target=\"_blank\">https:\/\/wiki.freeswitch.org\/wiki\/Mod_tts_commandline<\/a><\/p>\n<p><a title=\"http:\/\/wiki.freeswitch.org\/wiki\/Category:TTS\" href=\"http:\/\/wiki.freeswitch.org\/wiki\/Category:TTS\" target=\"_blank\">http:\/\/wiki.freeswitch.org\/wiki\/Category:TTS<\/a><\/p>\n<p><a title=\"https:\/\/wiki.freeswitch.org\/wiki\/Mod_lua\" href=\"https:\/\/wiki.freeswitch.org\/wiki\/Mod_lua\" target=\"_blank\">https:\/\/wiki.freeswitch.org\/wiki\/Mod_lua<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Freeswitch \uc5d0\uc11c TTS \uc11c\ube44\uc2a4\ub97c \uc81c\uacf5\ud558\ub294 \ubc29\ubc95\uc740 \ud06c\uac8c \ub450\uac00\uc9c0\uac00 \uc788\ub2e4. 1. Dialplan \uc5d0\uc11c \ud574\ub2f9 \ubaa8\ub4c8\uc744 \uc9c1\uc811 \ud638\ucd9c\ud558\ub294 \ubc29\ubc95. 2. Python, Lua \uc640 \uac19\uc740 \uc2a4\ud06c\ub9bd\ud2b8 \ubaa8\ub4c8\uc5d0\uc11c \ud638\ucd9c\ud558\ub294 \ubc29\ubc95 \uc5ec\uae30\uc5d0\uc11c\ub294 Python \uc2a4\ud06c\ub9bd\ud2b8 \ubaa8\ub4c8\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 \ubc29\ubc95\uc744 \uae30\uc220\ud55c\ub2e4. &nbsp; mod_tts_commandline \uc744 \uc0ac\uc6a9\ud558\ub294 \ubc29\ubc95 Freeswitch \uc5d0\uc11c\ub294 &hellip; <a href=\"http:\/\/pchero21.com\/?p=3308\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[179,264,265,313,393],"_links":{"self":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/3308"}],"collection":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3308"}],"version-history":[{"count":0,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/3308\/revisions"}],"wp:attachment":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3308"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}