ぼけーっとネットサーフィンしてたところ、Linuxで(英語だけど)コンソール上で文章を打つと、Siriみたいに対応してくれる『Betty』なるツールを見かけたので、試しに入れてみることにした。 Rubyで書かれているようだ。

とりあえず、今回はUbuntu Server 16.04 LTS上にこれを入れてみることにする。 以下のコマンドでインストールができる。

git clone https://github.com/pickhardt/betty
cd betty
ruby install.rb
source ~/.bashrc

インストールできたら、実際に使ってみよう。 例えば、whoamiを実行する場合は以下のように語りかけてやればいい。

betty whats my name
blacknon@BS-PUB-UBUNTU-01:~/betty$ betty whats my name
Betty: Okay, I have multiple ways to respond.
Betty: Enter the number of the command you want me to run, or N (no) if you don't want me to run any.
[1] whoami
    Gets your system username.
[2] finger $(whoami) | sed 's/.*: *//;q'
    Gets your full name.
1
Betty: Running whoami
blacknon
blacknon@BS-PUB-UBUNTU-01:~/betty$
blacknon@BS-PUB-UBUNTU-01:~/betty$ betty whats my name
Betty: Okay, I have multiple ways to respond.
Betty: Enter the number of the command you want me to run, or N (no) if you don't want me to run any.
[1] whoami
    Gets your system username.
[2] finger $(whoami) | sed 's/.*: *//;q'
    Gets your full name.
2
Betty: Running finger $(whoami) | sed 's/.*: *//;q'
blacknon

その他、whats time nowと入れてやれば時刻を表示してくれるし、色々とやってくれるようだ。 なお、残念ながら卑猥な単語を投げてもSiriのように反応はしてくれないので注意。