LoginSignup
0
1

More than 1 year has passed since last update.

discord.jsでテキスト読み上げ機能を作った時に詰まったところの備忘録

Last updated at Posted at 2021-11-17

遭遇したエラー1つ目

Could not load the default credentials.

これはどうやらgoogle関連のパッケージを利用をしている時に出るようです。私はテキストの読み上げに「@google-cloud/text-to-speech」を使っていたのでそれで出たみたいです。ざっくり言うとgoogle cloud登録しろよってことです。
こちらのページを参考にしてgoogle cloudに登録したりして無事解決。

遭遇したエラー2つ目

Error:'FFmpeg/avconv not found!'

テキスト読み上げ機能が完成してからbotをherokuにデプロイしたものの読み上げてくれない...
ローカル環境では動いてくれたのに...
どうやらherokuで音声ファイルを再生したりするのに必要なもんがないらしい。
ターミナル上で

heroku buildpacks:add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git

を実行すると無事読み上げてくれました!!
困った人の役に立てば幸いです。ではでは〜

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