3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Node-REDでAlexaにテキストを読み上げてもらう

Last updated at Posted at 2020-09-14

Node-RED with Alexa

Node-REDでプロジェクトを作成して特定のテキストをEcho-dotのAlexaに読み上げてもらうまでの手順をまとめました。
下のつぶやきみたいに歌詞の一節を読み上げてもらいました。

真っ赤/My Hair is Bad (Node-REDだけにね!)

前提条件

Alexa搭載のデバイスがすでにネットワークにつながっている状態を想定しています。
ですのでAlexa本体のセットアップなどについては省略します。
私はAmzonのタイムセールで購入したEcho Dot第3世代で試しました。

Echo Dot (エコードット)第3世代 - スマートスピーカー with Alexa

ローカルにNode-Redをインストールしてプロジェクトを立ち上げる

▶︎インストールコマンド
Windowsの場合

npm install -g node-red

Macの場合


sudo npm install -g node-red

▶︎起動コマンド

node-red

http://127.0.0.1:1880/ にアクセス

下記の画面が表示されたら成功です。

node-red-contrib-alexa-remote2をインストール

こちらの記事を参考にさせていただきました。

Alexaをしゃべらせる(Node-red編)
右上のハンバーガーメニュー>パレットの管理>ノードを追加タブの🔍ノードを検索の所に__node-red-contrib-alexa-remote2__と入力>ノードを追加 でインストール完了です。

フロー作成

Alexaのノード一覧からAlexa Routineを選んでワークスペースに置いてあげましょう。
スクリーンショット 2020-09-14 18.36.44.png

設定

ノードをクリックしてAlexaと紐づいているアカウント情報を入力してあげます。

Accountの編集ボタンをクリックすると下の画面に遷移します。

Auth Method: Email & Password
Email: Alexaに紐づいているAmazonアカウントのメールアドレス
Password: Amazonアカウントのパスワード
Service Host: alexa.amazon.co.jp
Page: amazon.co.jp
Language: ja_JP

以上を入力して更新をクリックします。

実行

TextにAlexaに読み上げて欲しいテキストを入力します
スクリーンショット 2020-09-14 19.46.07.png

あとはinjectノードにつないで、デプロイして完了です。
スクリーンショット 2020-09-14 19.47.24.png

香水/瑛人を歌って(読み上げて)もらいましょう。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?