{"id":929,"date":"2022-10-05T19:06:00","date_gmt":"2022-10-05T10:06:00","guid":{"rendered":"http:\/\/systemdev.comsys-blog.com\/?p=929"},"modified":"2022-10-05T19:06:00","modified_gmt":"2022-10-05T10:06:00","slug":"asterisk-%e4%bf%9d%e7%95%99%e9%9f%b3%e3%82%92%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/tamura.jp\/?p=929","title":{"rendered":"asterisk \u4fdd\u7559\u97f3\u3092\u5909\u63db\u3059\u308b"},"content":{"rendered":"<p>#!\/bin\/sh<\/p>\n<p>INDIR=\/music\/original<br \/>\nOTDIR=\/music\/asterisk<br \/>\nfind ${INDIR}\/ -name &#8220;*.wav&#8221; | grep &#8221; &#8221; | sed -e &#8216;s\/.*\/&#8221;&amp;&#8221;\/; p; s\/ \/_\/g&#8217; | xargs -n2 mv<br \/>\nif [ ! -e ${INDIR} ]; then<br \/>\n        echo &#8220;${INDIR}$1: \u5143\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u304c\u5b58\u5728\u3057\u307e\u305b\u3093.&#8221;<br \/>\n        return 0<br \/>\nfi<br \/>\nif [ ! -d ${INDIR} ]; then<br \/>\n        echo &#8220;$1: \u5143\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30d5\u30a9\u30eb\u30c0\u30fc\u3067\u306f\u3042\u308a\u307e\u305b\u3093.&#8221;<br \/>\n        return 0<br \/>\nfi<br \/>\nif [ ! -e ${OTDIR} ]; then<br \/>\n        echo &#8220;${OTDIR}$1: \u5148\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u304c\u5b58\u5728\u3057\u307e\u305b\u3093.&#8221;<br \/>\n        return 0<br \/>\nfi<br \/>\nif [ ! -d ${OTDIR} ]; then<br \/>\n        echo &#8220;$1: \u5148\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30d5\u30a9\u30eb\u30c0\u30fc\u3067\u306f\u3042\u308a\u307e\u305b\u3093.&#8221;<br \/>\n        return 0<br \/>\nfi<br \/>\nfor file in `ls -1A ${INDIR}\/*.wav `<br \/>\ndo<br \/>\n  fname=`basename ${file}`<br \/>\n  echo ${fname}<br \/>\n  sox &#8220;${INDIR}\/${fname}&#8221; -b 16 &#8220;${OTDIR}\/${fname}&#8221; channels 1 rate 8k norm gain -24<br \/>\ndone<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/sh INDIR=\/music\/original OTDIR=\/music\/asterisk find ${INDIR}\/ -name &#8220;*.wav&#8221; | grep &#8221;  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-929","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/posts\/929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tamura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=929"}],"version-history":[{"count":0,"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/posts\/929\/revisions"}],"wp:attachment":[{"href":"https:\/\/tamura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tamura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tamura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}