LoginSignup
6
7

More than 5 years have passed since last update.

raspberry pi のAlexaを日本語化

Last updated at Posted at 2017-12-10

概要

自作のraspberry pi上のAlexaを日本語化しました。
但し、以下の公式wiki等で、一度英語版ラズパイalexaが出来てる前提です。
対象ファイルを日本語用に修正して、再度installシェルから実施し直します。
※自分は上記の流れで、英語から日本語にしましたが、直接日本語も可能だと思います。

公式wiki(英語Alexa)

Raspberry Pi
https://github.com/alexa/alexa-avs-sample-app/wiki/Raspberry-Pi

修正対象ファイル

installシェル

alexa-avs-sample-app/automated_install.sh
424行目を修正して、日本語ロケールを選択可能にしておく。

前:select_option Locale "en-US" "en-GB" "de-DE"
後:select_option Locale "en-US" "en-GB" "de-DE" "ja-JP"

コンフィグファイル

alexa-avs-sample-app/samples/javaclient/config.json
ロケールを英語から日本語に変更。

前 "locale":"en-US",
後 "locale":"ja-JP",

Javaファイル

alexa-avs-sample-app/samples/javaclient/src/main/java/com/amazon/alexa/avs/config/DeviceConfig.java
日本語のロケールを追加。

 static {
     SUPPORTED_LOCALES.add(Locale.US);
     SUPPORTED_LOCALES.add(Locale.UK);
     SUPPORTED_LOCALES.add(Locale.GERMANY);
 }
 static {
     SUPPORTED_LOCALES.add(Locale.US);
     SUPPORTED_LOCALES.add(Locale.UK);
     SUPPORTED_LOCALES.add(Locale.GERMANY);
     SUPPORTED_LOCALES.add(Locale.JAPAN);
 }

再インストール

修正したautomated_install.shで、公式wikiの
"Step 6: Run the install script"から再実行します。
途中ロケールを選択する箇所があるので、そこで、"ja-JP"を選択します。
2017-12-10.png

参考にさせて頂きました

alexa-avs-sample-appを日本語に対応させるhttps://qiita.com/moritalous/items/a3e847612dd2bf4fed99

6
7
2

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
6
7