Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
VUIでシェル芸を実行できるようにしてみた
Search
amanoese
August 10, 2019
Technology
2.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
VUIでシェル芸を実行できるようにしてみた
第43回シェル芸勉強会(2019/8/10)のLTで発表した内容です。
amanoese
August 10, 2019
More Decks by amanoese
See All by amanoese
魔術式シェル芸
amanoese
0
1.3k
シェル芸でなれるVTuber!
amanoese
0
970
Technopop shell-gei(テクノポップシェル芸)
amanoese
0
570
Alexaアカウントリンクの認証と申請で躓いた話
amanoese
0
110
シェル芸のおかげでUnicodeに怯えず楽しめるようになった話
amanoese
0
270
AlexaにSSMLで音声記号(IPA) 使って喋らせたかった
amanoese
0
530
インタラクティブなシェル芸実行コマンド作った感想
amanoese
0
210
静的WEBサイトをSPA化するワンライナー
amanoese
0
160
Other Decks in Technology
See All in Technology
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
310
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
870
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
510
自分で立ててみるLLMサービス
y_sera15
0
140
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
410
メルペイ 会計システム概要と歴史
mewuto
0
190
2026-10-01_MagicPod_QAハーネスエンジニアリングとQA組織の未来像
ynisqa1988
1
550
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
170
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
210
FinTech 1-2 : Overview of FinTech
ks91
PRO
0
150
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
2
880
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
310
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
390
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
460
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
The Language of Interfaces
destraynor
162
27k
Bash Introduction
62gerente
615
220k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
370
WCS-LA-2024
lcolladotor
0
850
Transcript
VUIでシェル芸を実行できるよう にしてみた
自己紹介 RustとElmに憧れてる自称うぇっぶけいふるすたっくえ んじにあ javascriptとシェル芸が好き 仕事では Java kotlin使い始めました taka@SIではたらくフレンズ @amanoese
VUIってなに? AlexaとかGoogle のスマートホームとか音声で操作するユーザーインターフェー スのこと 個人的にはAlexaが好き
VUIでシェル芸をしたい rm -rf / unko.shout
Alexaに実装してみた
シェル芸をどうやって音声で伝えるか
シェル芸 -> Base32 -> ひらがな Base64をひらがなにマップすると半濁音鼻濁音の発音難しいため シェル芸をBase32に変換後ひらがなにマップした発音をAlexaにする。 つまりこういうこと $ echo
'unko.shout 私が公式マスコット' | base32 -w0 | sed 'y@ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=@あいうえおかきく けこさし すせそたちつてとなにぬねのはひふへほまみむ@' そにねきぬふはそそせなきまほしなおえとひたあたえちききそしいせす へぬまけみのへえとふつのかそたえちさはまくあへえへそいのちうちむ
シェル芸 -> Base32 -> ひらがな しかし… さすがに脈絡の無い単語を発音するのは困難(やってみてわかった) なのでVUIを意識して変更してみる そにねきぬふはそそせなきまほしなおえとひたあたえちききそしいせす へぬまけみのへえとふつのかそたえちさはまくあへえへそいのちうちむ
シェル芸 -> dump echo -n 'unko.shout 私が公式マスコット' | od -tx1
-A n|tr '[:lower:]' '[:upper:]' 75 6E 6B 6F 2E 73 68 6F 75 74 20 E7 A7 81 E3 81 8C E5 85 AC E5 BC 8F E3 83 9E E3 82 B9 E3 82 B3 E3 83 83 E3 83 88
そして呪文(詠唱)を集めたJSONを用意 適当に集めてきた呪文(詠唱)をMecabで名詞と動詞に分けて、 0~FFまでの数字と対応付けたJSONファイルを作成します。 cat spell.txt | mecab | tr '\t'
,|awk -F, '$2~/名詞/||$1~/EOF/{print s;a=1;s=$1}a==2{a=0;s=""}a==1&&$2~/助詞/{a=0;if($3~/連体化 /){a=2}s=s$1}'|sed -n '/../p'|sort -u |grep -P '\p{Han}' paste - 255.txt | head -256 | sed -r 's/^(.*)\t/\"\1\":/;s/:(.*)/:"\1",/'| sed '1s/^/{/;256s/,/}/' > meisi.json {"安らぎ":"00","為す":"01","移る":"02","育み":"03","育む":"04","引き":"05","引き継 が":"06","引き裂く":"07","羽ばたき":"08","渦巻く":"09","汚し":"0A","汚れ":"0B","汚 れた":"0C", ... } https://gist.github.com/amanoese/92ee02989a1e3371981a96aa8dce36c1
シェル芸 -> dump -> 呪文 JSONを利用してシェル芸を呪文に変換 $ echo -n 'unko.shout
私が公式マスコット' | od -tx1 -A n|tr '[:lower:]' '[:upper:]' | xargs -n1 | sed -f <(cat meisi.json meisi.json meisi.json dousi.json |tr -d '{},'|sed -r 's#^$##;s#(.*):(.*)#s\2:\1#;s#:"##;s#"#/#g'|awk '$0'|awk '{print int((NR-1)/256 + 1)"~4"$0}') |sed '4~4s/$/。/'|tr -d \\n 客を希望を眼差しで示せ。永久に鬼を棺に示せ。客を義務を印を討つ。光に狭間の 雫よ囚われ。空を七色の極限の吹き飛べ。七色の砂の結晶渡れ。胸に言の雫よ終 わり。魂を雫よ狭霧清め。雫よ胸に胸に渡れ。胸に具現
かっこよく呪文を唱えて シェル芸を実行 客を希望を眼差しで示せ。永久に鬼を棺に示せ。客を義務を印を 討つ。光に狭間の雫よ囚われ。空を七色の極限の吹き飛べ。七 色の砂の結晶渡れ。胸に言の雫よ終わり。魂を雫よ狭霧清め。 雫よ胸に胸に渡れ。胸に具現
かっこよく呪文を唱えて シェル芸を実行 実際にデモ
感想とか今後とか がんばってリリース目指す(Alexaスキルアワード参加させてみたい) 生成した文言が呪文ぽくないので、良い感じになるように修正したい ツイートするだけでなく実際にシェルを実行するようにしたい
None