﻿{"id":1703,"date":"2018-05-28T11:52:36","date_gmt":"2018-05-28T03:52:36","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=1703"},"modified":"2019-03-26T14:14:01","modified_gmt":"2019-03-26T06:14:01","slug":"%e8%ae%b0ekho%e5%ae%89%e8%a3%85%e5%88%b0%e5%b5%8c%e5%85%a5%e5%bc%8f%e8%ae%be%e5%a4%87","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/linux\/1703","title":{"rendered":"\u8bb0ekho\u5b89\u88c5\u5230\u5d4c\u5165\u5f0f\u8bbe\u5907"},"content":{"rendered":"<p>ekho\u6309\u7167\u5b98\u65b9\u7f16\u8bd1\u5b89\u88c5ubuntu\u7248\u672c\u7684<\/p>\n<p>apt-get install libsndfile1-dev libpulse-dev libncurses5-dev libmp3lame-dev libespeak-dev\u00a0<span class=\"s1\">pulseaudio<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">wget &#8211;no-check-certificate https:\/\/sourceforge.net\/projects\/e-guidedog\/files\/Ekho\/7.7\/ekho-7.7.1.tar.xz<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">tar xvf ekho-7.7.1.tar.xz<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">cd ekho-7.7.1<\/span><\/p>\n<p class=\"p1\">.\/configure<\/p>\n<p class=\"p1\">make<\/p>\n<p class=\"p1\">make install<\/p>\n<p class=\"p1\">ekho &#8220;hello 123&#8221;<\/p>\n<p>\u7f16\u8bd1\u540e\u8fd0\u884c\u53d1\u73b0\u62a5\u9519<\/p>\n<p class=\"p1\"><span class=\"s1\">pa_simple_new() failed: Access denied<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">pa_sample_spec(format=3,rate=16000,channels=ch=1)<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Fail to init audio stream.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Fail to init sound.<\/span><\/p>\n<p class=\"p1\">\u6700\u540e\u53d1\u73b0\u662f\u00a0<span class=\"s1\">pulseaudio \u670d\u52a1\u91cc\u7528\u4e86&#8211;system\u53c2\u6570, \u53bb\u6389\u5373\u53ef\u6b63\u5e38\u4f7f\u7528, \u5177\u4f53\u539f\u56e0\u8fd8\u4e0d\u6e05\u695a.<\/span><\/p>\n<p><strong>1)<\/strong> Would you please try this with user1:<\/p>\n<pre>sudo gpasswd -a user1 pulse-access\nsudo gpasswd -a user1 pulse-rt\nsudo gpasswd -a pulse audio<\/pre>\n<hr \/>\n<p><strong>2)<\/strong> Have you tried this?<\/p>\n<p>&#8221; edit \/usr\/local\/etc\/pulse\/system.pa and add:<\/p>\n<pre><code>load-module module-native-protocol-unix auth-anonymous=1\n<\/code><\/pre>\n<p>Reference: <a href=\"https:\/\/tango.0pointer.de\/pipermail\/pulseaudio-discuss\/2009-January\/002942.html\"><a href=\"https:\/\/tango.0pointer.de\/pipermail\/pulseaudio-discuss\/2009-January\/002942.html\">https:\/\/tango.0pointer.de\/pipermail\/pulseaudio-discuss\/2009-January\/002942.html<\/a><\/a><\/p>\n<hr \/>\n<p><strong>3)<\/strong> Try running pulseaudio in system mode<\/p>\n<p>Reference: <a href=\"https:\/\/bugzilla.redhat.com\/attachment.cgi?id=262541\"><a href=\"https:\/\/bugzilla.redhat.com\/attachment.cgi?id=262541\">https:\/\/bugzilla.redhat.com\/attachment.cgi?id=262541<\/a><\/a><\/p>\n<hr \/>\n<p><strong>4)<\/strong> Make sure user2 does not run pulseaudio as root<\/p>\n<hr \/>\n<p><strong>5)<\/strong> Remove applications from user2 that may not release audio (e.g. timidity)<\/p>\n<hr \/>\n<p><strong>6)<\/strong> Go through <code>~\/.asoundrc<\/code> and <code>\/etc\/asound.conf<\/code> if present<\/p>\n<hr \/>\n<p><strong>7)<\/strong> Check if &#8220;<a href=\"http:\/\/ubuntuforums.org\/showthread.php?t=789578\">the evil libflashsupport library<\/a>&#8221; is installed. To uninstall:<\/p>\n<pre><code> sudo aptitude purge libflashsupport flashplugin-nonfree-extrasound  \n<\/code><\/pre>\n<hr \/>\n<p><strong>8)<\/strong> Start pulseaudio daemon system wide:<\/p>\n<pre><code>gksu gedit \/etc\/default\/pulseaudio  \n<\/code><\/pre>\n<p>And change &#8220;PULSEAUDIO_SYSTEM_START=0&#8221; for &#8220;PULSEAUDIO_SYSTEM_START=1&#8221;<\/p>\n<p><strong>9)<\/strong> Try unplugging audio hardware like external speakers and reboot.<\/p>\n<p>&nbsp;<\/p>\n<p>Ekho\u8bed\u97f3\u5408\u6210\u8f6f\u4ef6\u7684\u539f\u7406\u5f88\u7b80\u5355\uff0c\u4e3a\u6bcf\u4e00\u4e2a\u62fc\u97f3\u5f55\u5236\u4e00\u4e2a\u97f3\u9891\u6587\u4ef6\uff0c\u7136\u540e\u62fc\u63a5\u8d77\u6765\u5408\u6210\u53e5\u5b50\u3002<\/p>\n<p>Ekho\u9ed8\u8ba4\u7684\u5b89\u88c5\u5305\u91cc\u5305\u542b\u7684\u97f3\u9891\u6587\u4ef6\u662fgsm\u540e\u7f00\u7684\uff0c\u5c3a\u5bf8\u8f83\u5c0f\uff0c\u8d28\u91cf\u8f83\u4f4e\u3002\u5927\u5bb6\u53ef\u4ee5\u5230Ekho\u8bed\u97f3\u6570\u636e\u9875\u9762\u4e0b\u8f7d\u8d28\u91cf\u66f4\u9ad8\u7684\u8bed\u97f3\u5305\u66ff\u6362\u3002\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ol>\n    <li>\u8bbf\u95eeEkho Voice Data\u9875\u9762\uff1a<a href=\"https:\/\/sourceforge.net\/projects\/e-guidedog\/files\/Ekho-Voice-Data\/0.2\/\">https:\/\/sourceforge.net\/projects\/e-guidedog\/files\/Ekho-Voice-Data\/0.2\/<\/a><\/li>\n    <li>\u627e\u5230\u9700\u8981\u4e0b\u8f7d\u7684\u8bed\u8a00\u5373\u7248\u672c\uff0c\u6587\u4ef6\u540d\u4e2d44100\u8fd9\u6837\u7684\u6570\u5b57\u8868\u793a\u97f3\u9891\u6587\u4ef6\u7684\u91c7\u6837\u7387\uff0c44100Hz\u662fCD\u7684\u97f3\u8d28\u3002\u4ee5\u85cf\u8bed\u4e3a\u4f8b\uff0c\u5e94\u8be5\u4e0b\u8f7d<a title=\"Click to download tibetan-trinley-44100-wav-v1.tar.xz\" href=\"https:\/\/sourceforge.net\/projects\/e-guidedog\/files\/Ekho-Voice-Data\/0.2\/tibetan-trinley-44100-wav-v1.tar.xz\/download\">tibetan-trinley-44100-wav-v1.tar.xz<\/a>\u3002\u6587\u4ef6\u653e\u5728\u56fd\u5916\u7684\u670d\u52a1\u5668\uff0c\u4e0b\u8f7d\u8d77\u6765\u53ef\u80fd\u4f1a\u6bd4\u8f83\u6162\uff08<a href=\"http:\/\/120.24.87.124\/tmp\/tibetan-trinley-44100-wav-v1.tar.xz\">\u8fd9\u91cc\u6709\u4e00\u4e2a\u85cf\u8bed\u8bed\u97f3\u6570\u636e\u5305\u56fd\u5185\u955c\u50cf<\/a>\uff09\u3002<\/li>\n    <li>\u4e0b\u8f7d\u4ee5\u540e\u89e3\u538b\u6587\u4ef6\uff0c\u66ff\u6362Ekho\/ekho-data\u6587\u4ef6\u5939\u91cc\u5bf9\u5e94\u7684\u8bed\u97f3\u6570\u636e\u6587\u4ef6\u5939\u3002\u7ee7\u7eed\u4ee5\u85cf\u8bed\u4e3a\u4f8b\uff0ctibetan-trinley-44100-wav-v1.tar.xz\u89e3\u538b\u540e\u662ftibetan-trinley-44100-wav\uff0c\u6539\u540d\u4e3atibetan\uff0c\u66ff\u6362C:\\Program Files\\Ekho\\ekho-data\\tibetan\u3002tibetan\u76ee\u5f55\u4e0b\u5e94\u8be5\u6709\u8bb8\u591awav\u6587\u4ef6\uff08\u800c\u4e0d\u5e94\u518d\u5d4c\u5957\u4e00\u4e2atibetan\u76ee\u5f55\uff09\u3002<\/li>\n    <li>\u5982\u679c\u662fLinux\u7248\u672c\uff0c\u5e76\u4e14\u662f\u62fc\u97f3\u6216\u7ca4\u8bed\uff0c\u9700\u8981\u628aekho-data\u4e0b\u7684pinyin.voice\u548cpinyin.index\u6587\u4ef6\u5220\u9664\u3002<\/li>\n    <li>\u91cd\u542fEkho\u5373\u53ef\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u540c\u6837\u9002\u7528\u4e8e\u5236\u4f5c\u548c\u66ff\u6362\u81ea\u5df1\u7684\u58f0\u97f3\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u6b63\u5e38\u542f\u52a8pulseaudio\u540e, \u64ad\u653e\u58f0\u97f3\u7a0b\u5e8f\u90fd\u80fd\u6b63\u5e38\u8fd0\u884c,\u4f46\u662f\u6ca1\u6709\u58f0\u97f3,\u53ef\u80fd\u662f\u7cfb\u7edf\u6709\u591a\u4e2a\u64ad\u653e\u8bbe\u5907,\u9700\u8981\u624b\u52a8\u6307\u5b9a\u9ed8\u8ba4\u64ad\u653e\u8bbe\u5907<\/p>\n<p class=\"p1\"><span class=\"s1\">aplay -l<\/span><\/p>\n<p class=\"p1\">\u67e5\u770b\u6b63\u786e\u64ad\u653e\u8bbe\u5907\u7684id\u540e\u66f4\u65b0\u5230asound.conf\u91cc, \u91cd\u542f\u670d\u52a1<\/p>\n<p class=\"p1\"><span class=\"s1\">\/etc\/asound.conf<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">defaults.pcm.card 0<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">defaults.pcm.device 0<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">defaults.ctl.card 0<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>ekho\u6309\u7167\u5b98\u65b9\u7f16\u8bd1\u5b89\u88c5ubuntu\u7248\u672c\u7684 apt-get install libsndfile1-dev libpulse-dev libncurses5-dev libmp3lame-dev li&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[490,491],"class_list":["post-1703","post","type-post","status-publish","format-standard","hentry","category-linux","tag-ekho","tag-pulseaudio"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=1703"}],"version-history":[{"count":10,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1703\/revisions"}],"predecessor-version":[{"id":1838,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1703\/revisions\/1838"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=1703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=1703"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=1703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}