Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Elixir/NervesでOpen JTalkを使い、 ラズパイに日本語をしゃべらせてみた
Search
Masatoshi Nishiguchi
September 24, 2025
Programming
37
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elixir/NervesでOpen JTalkを使い、 ラズパイに日本語をしゃべらせてみた
open_jtalk_elixir の開発録
Masatoshi Nishiguchi
September 24, 2025
Other Decks in Programming
See All in Programming
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
170
React本体のコードリーディング
high_g_engineer
1
140
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
870
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
240
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
220
「人を評価する AI」の設計と実装
ryoyanara
0
180
メールのエイリアス機能を履き違えない
isshinfunada
0
230
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
110
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
600
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
540
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
460
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
380
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
240
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Believing is Seeing
oripsolob
1
180
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
410
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
45k
How to train your dragon (web standard)
notwaldorf
97
6.7k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Transcript
Elixir/NervesでOpen JTalkを使い、 ラズパイに日本語をしゃべらせてみた open_jtalk_elixir の開発録 mnishiguchi
きっかけ • 友人のひとこと: 「Nervesでラズパイに日本語しゃべらせられない?」 • 地味にハードル高そう… • 元氣があれば何でもできる
Open JTalkとは • 日本語テキスト音声合成(Text to Speech, TTS)エンジン • CLIベースで軽量、組み込み向き •
構成要素 ◦ Open JTalk 本体(CLI) ◦ MeCab辞書(形態素解析・読み・アクセント) ◦ HTS 音声モデル(`.htsvoice`ファイル)
https://raspida.com/speech-synthesis/
目標 • 開発も運用も楽しい 🎉 • 実装が容易でかつ保守対応しやすいこと • 初期導入が簡単であること • 実行時の安全性を確保すること
• Nerves(組み込み)でも動く
None
Open JTalk を Elixir から使うには? • NIF(Native Implemented Function) ◦
高速だがVMごと落ちるリスクあり • Port ◦ 柔軟だけど I/O や引数管理が面倒 • System.cmd/3 ◦ シンプル ◦ 移植性高い ◦ クラッシュしても VM に影響なし
Open JTalk のビルド • 課題 ◦ MeCab / HTS /
Open JTalk など、依存関係の解決に一定の知識と 手間が必要 ◦ 辞書:約 100MB、音声モデル:約 2MB と、サイズもやや大きめ • 解決策 ◦ mix compile 時に Open JTalk を 自動ビルド ◦ 辞書・音声モデルを 標準で同梱 ◦ 環境変数で 外部の辞書/音声への切替に対応
クロスプラットフォーム対応 • Linux: ARM系 ◦ config.sub更新必要 • macOS ◦ 静的リンク不可→動的リンク
◦ aplay→afplay • Nerves ◦ MIX_TARGETでクロスコンパイル ◦ 容量制約あり • CI 環境での確認 ◦ Linux x86_64 ◦ Linux aarch64 ◦ macOS 14 (arm64, Apple Silicon)
論よりRUN
Nerves で使うとき • MIX_TARGET指定でクロスコンパイル • 辞書/音声: 開発は同梱、運用は外部配置 • 音声出力: Linuxはaplay,
ALSA設定要確認
まとめ • 日本語の音声合成を ローカル環境で Elixir で簡単に実現 • Linux / macOS
/ Nerves で動作 • GitHub: piyopiyoex/open_jtalk_elixir