Last active
July 18, 2017 15:05
-
-
Save MITSUBOSHI/d431a2fb62b28453c4c157dfddc6c1c5 to your computer and use it in GitHub Desktop.
ラジオ伊集院光「深夜の馬鹿力」をIBM Watson Speech to Textでテキスト化してみた ref: http://qiita.com/MITSUBOSH/items/29718f6b209fc8df45a6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install youtube-dl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
youtube-dl -F https://youtu.be/QxjL1ygSDNc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
youtube-dl -f140 https://youtu.be/QxjL1ygSDNc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install ffmpeg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i "podcast-ep186.mp3" -vn -vn -ac 2 -ar 44100 -ab 256k -acodec wav -f wav "output.wav" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i output.wav -f segment -segment_time 60 -c copy out%04d.wav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST -u $WATSON_USERNAME:$WATSON_PASSWORD\ | |
--header "Content-Type: audio/wav" \ | |
--data-binary "@${file}" \ | |
"https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?timestamps=true&model=ja-JP_BroadbandModel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat result.json | jq '.results[].alternatives[].transcript' | tr -d '"' > sorted_result.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
うん 音 を | |
三 〇 YAHOO 知恵袋 便利な サイト です けれども D_エー ます ので | |
全て の 質問 を して いる | |
せっかく の D_エート を サイト に | |
D_エー 目 を 北 | |
そやから 耐えられる こと で エクソダス 百 十 五条 の 約 束 グローバル 送って 下さい と いう もの です | |
D_エー 部長 最終 も クソ みたいな 質問 は こちら | |
うーん うーん うーん なし 四年目 | |
そろそろ 中世 中山 さん | |
お久しぶり です | |
英文 費用 節約 の ため 印鑑 を 買って インド 覚え させた もの です | |
飼い始めて 一カ月 ほど は いい あんばい でした | |
しかし | |
エサ代 が バカ に ならない | |
(後略) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment