LoginSignup
0
1

More than 5 years have passed since last update.

【GCP】文字起こし

Last updated at Posted at 2018-05-09

Uniteのシロちゃんの動画が為になったので文字起こししてみた。

基本こちらの記事をなぞる
Google Cloud Speech API を使った音声の文字起こし手順

FLACファイルを用意

日本語版:【Unite Tokyo 2018】バーチャルYouTuber電脳少女シロがご紹介する「2018年の注目アセット100連発」
英語版:【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber Girl Siro

youtube -> mp3
https://www.clipconverter.cc/

mp3 -> flac
https://audio.online-convert.com/convert-to-flac

つまずきポイント

ImportError

ImportError: cannot import name speech

sudo pip install google-cloud-speechで解決。

403 Cloud Speech API

google.api_core.exceptions.PermissionDenied: 403 Cloud Speech API has not been used in project 618104708054 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/speech.googleapis.com/overview?project=618104708054 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

サービスアカウントの再取得で上手くいくときと、失敗するときがある。
失敗するときは、パケットごと作り直したら上手くいった。

文字化け

元のスクリプトがshift_jis設定なので正常なのだが。
Cloud Shell上部の鉛筆マークからコードエディタに移動。
文字起こししたテキストファイルを File > Export > Download
ローカルに持ってきた後に文字コードを変えたければ変えればいい。

参考
超初心者でもgoogle-cloud-speechを使えるが、つまずいた所はある。

結果

日本語
英語

専門用語が多いからか、精度はよくない。
これは使えないなー。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1