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
36
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
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
110
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
710
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
net-httpのHTTP/2対応について
naruse
0
500
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
250
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
190
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
410
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
260
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
6.9k
AIで効率化できた業務・日常
ochtum
0
140
Webフレームワークの ベンチマークについて
yusukebe
0
170
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
860
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
The SEO Collaboration Effect
kristinabergwall1
1
490
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
620
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
260
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
400
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
A Soul's Torment
seathinner
6
3k
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