{"componentChunkName":"component---src-templates-post-template-js","path":"/posts/language-in-audio-data","result":{"data":{"markdownRemark":{"id":"cb1ef06c-7ee7-558b-8736-b335660828d2","html":"<p><a href=\"https://qiita.com/advent-calendar/2021/media-and-xr-lonely\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">画像・動画・音声処理および XR 一人アドベントカレンダー</a> 7 日目の記事です。</p>\n<p>音声データにおける言語の取り扱いについて調べたことをまとめます。</p>\n<p>形態素解析などのいわゆる自然言語処理に関する内容ではなく、</p>\n<ul>\n<li>音声認識・文字起こし</li>\n<li>音声合成</li>\n</ul>\n<p>について書いていきます。</p>\n<h2 id=\"音声認識・文字起こし\" style=\"position:relative;\"><a href=\"#%E9%9F%B3%E5%A3%B0%E8%AA%8D%E8%AD%98%E3%83%BB%E6%96%87%E5%AD%97%E8%B5%B7%E3%81%93%E3%81%97\" aria-label=\"音声認識・文字起こし permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>音声認識・文字起こし</h2>\n<h3 id=\"文字起こしの種類\" style=\"position:relative;\"><a href=\"#%E6%96%87%E5%AD%97%E8%B5%B7%E3%81%93%E3%81%97%E3%81%AE%E7%A8%AE%E9%A1%9E\" aria-label=\"文字起こしの種類 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>文字起こしの種類</h3>\n<p>文字起こしについて調べてみると、以下の 3 つの種類があることが分かりました。</p>\n<ul>\n<li>素起こし … 「えー」などの “フィラー (ケバ)” を含め、一言一句文字にすること</li>\n<li>ケバ取り … フィラー (ケバ) を取り除いた文章に起こすこと</li>\n<li>整文 … ケバ取りしたものに加えて、話し言葉を読み言葉に変換したりして整えること</li>\n</ul>\n<p>参考: <a href=\"https://withteam.jp/mojiokoshi/blog/mojiokosi-basics/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">「ケバ取り」「素起こし」「整文」の違いとは？文字起こし方法の基本的な 3 種類を解説！ | WITH TEAM（ウィズチーム）</a></p>\n<h3 id=\"トレーニング済み-api\" style=\"position:relative;\"><a href=\"#%E3%83%88%E3%83%AC%E3%83%BC%E3%83%8B%E3%83%B3%E3%82%B0%E6%B8%88%E3%81%BF-api\" aria-label=\"トレーニング済み api permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>トレーニング済み API</h3>\n<p>音声認識・文字起こしのトレーニング済み API については、まとめている記事がいくつかありました。</p>\n<ul>\n<li><a href=\"https://qiita.com/ysugiyama12/items/bf246e80ae4d1dc16441\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">音声を文字起こしする API を何種類か触ってみた - Qiita</a></li>\n<li><a href=\"https://blog.api.rakuten.net/ja/top-speech-recognition-apis-jp/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">人気の音声認識 API トップ 10: Siri API, Speech to Text, Rev.AI – Rakuten RapidAPI Blog</a></li>\n<li><a href=\"https://ledge.ai/voice-recognition-comparison/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">音声認識エンジンはどう選ぶ？主要な 4 つを比較検証してみた | Ledge.ai</a></li>\n</ul>\n<p>現状、こういった API である程度の精度が期待できるようです。</p>\n<p>どの API を使うべきかは、用途次第になるようです。</p>\n<h3 id=\"エンジン・ライブラリ\" style=\"position:relative;\"><a href=\"#%E3%82%A8%E3%83%B3%E3%82%B8%E3%83%B3%E3%83%BB%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83%AA\" aria-label=\"エンジン・ライブラリ permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>エンジン・ライブラリ</h3>\n<p>続いて、音声認識のエンジンやライブラリについてです。</p>\n<h4 id=\"cmu-sphinx\" style=\"position:relative;\"><a href=\"#cmu-sphinx\" aria-label=\"cmu sphinx permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>CMU Sphinx</h4>\n<p>CMU Sphinx は、カーネギーメロン大学で開発された OSS の音声認識エンジンです。</p>\n<p>参考: <a href=\"https://en.wikipedia.org/wiki/CMU_Sphinx\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CMU Sphinx - Wikipedia</a></p>\n<h4 id=\"snowboy\" style=\"position:relative;\"><a href=\"#snowboy\" aria-label=\"snowboy permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Snowboy</h4>\n<p>Snowboy は、ホットワード検出エンジンです。</p>\n<p>ホットワード検出というのは、「OK, Google」のような、問いかけのキーワードのことです。</p>\n<ul>\n<li><a href=\"https://github.com/seasalt-ai/snowboy\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">seasalt-ai/snowboy: DNN based hotword and wake word detection toolkit (model generation included)</a></li>\n<li><a href=\"https://uepon.hatenadiary.com/entry/2020/10/26/022159\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">【RaspberryPi】Hot Word 検出 Snowboy でオリジナルの Hot Word を検知してみる（前編：設定） - uepon 日々の備忘録</a></li>\n</ul>\n<h4 id=\"speechrecognition-python\" style=\"position:relative;\"><a href=\"#speechrecognition-python\" aria-label=\"speechrecognition python permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>SpeechRecognition (Python)</h4>\n<p>Python の SpeechRecognition というライブラリは、各種エンジン・API に対応しています。</p>\n<p>参考</p>\n<ul>\n<li><a href=\"https://pypi.org/project/SpeechRecognition/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">SpeechRecognition · PyPI</a></li>\n<li><a href=\"https://self-development.info/python%E3%81%A7%E9%9F%B3%E5%A3%B0%E3%81%8B%E3%82%89%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%B8%E5%A4%89%E6%8F%9B%E3%80%90speechrecognition%E3%80%91/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Python で音声からテキストへ変換【SpeechRecognition】 | ジコログ</a></li>\n</ul>\n<p>なお、このライブラリで選択できる「Google Speech Recognition」については、調べてもよく分かりませんでした。</p>\n<p>参考: <a href=\"https://teratail.com/questions/318640\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Python - Python の音声認識ライブラリ「speech_recognition」の「Google Speech Recognition」の実体がわかりません。｜ teratail</a></p>\n<h4 id=\"web-speech-api\" style=\"position:relative;\"><a href=\"#web-speech-api\" aria-label=\"web speech api permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Web Speech API</h4>\n<p>Web Speech API を使うと、Chrome for Desktop と Android であれば、ブラウザで簡単に音声認識ができるようです。</p>\n<p>これは驚きました。</p>\n<p>参考: <a href=\"https://developer.mozilla.org/ja/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Web Speech API を使う - Web API | MDN</a></p>\n<h2 id=\"音声合成\" style=\"position:relative;\"><a href=\"#%E9%9F%B3%E5%A3%B0%E5%90%88%E6%88%90\" aria-label=\"音声合成 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>音声合成</h2>\n<p>YouTube などの動画配信プラットフォームで、人の声ではなく機械的な声で文字が読まれているケースがあると思います。</p>\n<p>そのことを、私は勝手に「機械音声」という言葉で表現していたのですが、どうやら「音声合成 (speech synthesis)」という言葉が適切なようです。</p>\n<p>参考: <a href=\"https://ja.wikipedia.org/wiki/%E9%9F%B3%E5%A3%B0%E5%90%88%E6%88%90\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">音声合成 - Wikipedia</a></p>\n<p>音声合成ツールについてまとめているページをいくつかリンクしておきます。</p>\n<ul>\n<li><a href=\"https://aviutl.info/onnseiyomiage-sohuto/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">おすすめの音声読み上げ(音声合成)ソフト【ゆっくり･CeVIO･VOICEROID+】 | AviUtl の易しい使い方</a></li>\n<li><a href=\"https://mens.esupro.co.jp/entry/onseiyomiage/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">音声読み上げソフトのおすすめ 5 選！無料で使えるソフトもご紹介 – エスプロマガジン</a></li>\n<li><a href=\"https://ondoku3.com/ja/post/what-is-best-taxt-to-speech/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">音声読み上げソフトのオススメまとめ。商用利用でも使える 7 選【無料・有料】｜音声読み上げソフト 音読さん</a></li>\n</ul>\n<p>無料で有名なものとしては、</p>\n<ul>\n<li>SoftTalk (いわゆる「ゆっくり」と呼ばれる音声)</li>\n<li>棒読みちゃん</li>\n<li>テキストーク</li>\n<li>VOICEVOX</li>\n</ul>\n<p>あたりのようです。</p>\n<p>SoftTalk や棒読みちゃんは、内部で「AquesTalk」を使っているとのことです。</p>\n<p>参考: <a href=\"https://dic.nicovideo.jp/a/aquestalk\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AquesTalk とは (アクエストークとは) [単語記事] - ニコニコ大百科</a></p>\n<p>関連して、初音ミクなどで有名な「VOCALOID」という単語について Wikipedia を見てみたところ、</p>\n<blockquote>\n<p>「VOCALOID（ボーカロイド）」および「ボカロ」はヤマハ株式会社の登録商標である</p>\n</blockquote>\n<p>ということで、一般名詞だと思っていたので驚きました。</p>\n<p>参考: <a href=\"https://ja.wikipedia.org/wiki/VOCALOID\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">VOCALOID - Wikipedia</a></p>\n<h3 id=\"コーパス\" style=\"position:relative;\"><a href=\"#%E3%82%B3%E3%83%BC%E3%83%91%E3%82%B9\" aria-label=\"コーパス permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>コーパス</h3>\n<p>関連する用語として「コーパス」について書いておきます。</p>\n<p>コーパスとは、ざっくり言えば、言葉のデータベースです。</p>\n<p>音声のコーパスもあり、例えば「JVS (Japanese versatile speech) corpus」というものを見つけました。</p>\n<p>参考: <a href=\"https://sites.google.com/site/shinnosuketakamichi/research-topics/jvs_corpus\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Shinnosuke Takamichi (高道 慎之介) - jvs_corpus</a></p>","fields":{"slug":"/posts/language-in-audio-data","tagSlugs":["/tag/audio/"],"autoRecommendPosts":["media-and-xr-lonely-advent-calendar","audio-video-streaming-data-basics","movie-processing-software","last-day-of-media-and-xr-lonely-advent-calendar"]},"frontmatter":{"date":"2021-12-07T14:42:31.224Z","description":"音声データにおける言語の取り扱いについて調べたことをまとめます。\n形態素解析などのいわゆる自然言語処理に関する内容ではなく、音声認識・文字起こし、音声合成について書いていきます。","tags":["audio"],"title":"音声データにおける言語の取り扱い","socialImage":null,"recommendPosts":null}}},"pageContext":{"slug":"/posts/language-in-audio-data"}},"staticQueryHashes":["251939775","3942705351","401334301"]}