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
米国カンファレンスで活躍したAzure AI Speech
Search
Yuta Matsumura
February 03, 2024
Technology
0
820
米国カンファレンスで活躍したAzure AI Speech
Fukuoka.NET Conf 2023 での登壇資料です
https://fukuten.connpass.com/event/303390/
Yuta Matsumura
February 03, 2024
Tweet
Share
More Decks by Yuta Matsumura
See All by Yuta Matsumura
Cloudflare の MCP サーバーをためしてみた
tsubakimoto_s
1
29
re:Invent の裏でアップデートされていた .NET Aspire で統合するAWS のクラウドリソース
tsubakimoto_s
1
97
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
300
Microsoft Entra External IDとAzure AD B2C
tsubakimoto_s
0
1.6k
Minimal Observability on Minimal API
tsubakimoto_s
0
110
ワークフローのコピペを自作で解消した話
tsubakimoto_s
0
84
Azure AI ことはじめ
tsubakimoto_s
0
670
Azureのコアサーバーレス Azure Functions
tsubakimoto_s
0
670
GitHub Codespaces Updates
tsubakimoto_s
0
540
Other Decks in Technology
See All in Technology
Snowflake Intelligenceにはこうやって立ち向かう!クラシルが考えるAI Readyなデータ基盤と活用のためのDataOps
gappy50
0
270
react-callを使ってダイヤログをいろんなとこで再利用しよう!
shinaps
2
250
企業の生成AIガバナンスにおけるエージェントとセキュリティ
lycorptech_jp
PRO
2
190
5分でカオスエンジニアリングを分かった気になろう
pandayumi
0
250
Rustから学ぶ 非同期処理の仕組み
skanehira
1
140
「全員プロダクトマネージャー」を実現する、Cursorによる仕様検討の自動運転
applism118
22
12k
TS-S205_昨年対比2倍以上の機能追加を実現するデータ基盤プロジェクトでのAI活用について
kaz3284
1
190
Unlocking the Power of AI Agents with LINE Bot MCP Server
linedevth
0
110
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
10
3.2k
AIのグローバルトレンド2025 #scrummikawa / global ai trend
kyonmm
PRO
1
300
LLMを搭載したプロダクトの品質保証の模索と学び
qa
0
1.1k
Aurora DSQLはサーバーレスアーキテクチャの常識を変えるのか
iwatatomoya
1
1k
Featured
See All Featured
Statistics for Hackers
jakevdp
799
220k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
KATA
mclloyd
32
14k
Done Done
chrislema
185
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
GraphQLとの向き合い方2022年版
quramy
49
14k
Speed Design
sergeychernyshev
32
1.1k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Transcript
#fukuten 米国カンファレンスで活躍した Azure AI Speech Fukuoka.NET Conf 2023 Yuta Matsumura
© 2023 Yuta Matsumura. #fukuten
#fukuten 松村 優大 (MLBお兄さん) Currently working for © 2023 Yuta
Matsumura. 株式会社オルターブース Chief Technical Architect Microsoft MVP for Developer Technologies Microsoft Top Partner Engineer Award C#, PHP, Azure, GitHub が好き #fukuten #devblogradio の中の人 @tsubakimoto_s
#fukuten © 2023 Yuta Matsumura.
#fukuten © 2023 Yuta Matsumura.
#fukuten © 2023 Yuta Matsumura.
#fukuten 海外カンファレンスに参加する気持ち • 発表はすべて英語です(当然) • 英語は得意じゃないけど、どんな内容が話されているかを 知りたい • 現地での熱量を体感したい •
スピーカーの小ネタで一緒に笑いたい © 2023 Yuta Matsumura.
#fukuten 翻訳アプリを探す旅が始まる 要件 • 英語を日本語に翻訳 • 音声でのリアルタイム翻訳 • 文字起こし •
翻訳結果の保存 • 長時間の翻訳 • PC で使いたい • なるべく安く © 2023 Yuta Matsumura.
#fukuten コレ!というアプリが見つからない ▼ 自分で作ろう © 2023 Yuta Matsumura.
#fukuten コレ!というアプリが見つからない ▼ 自分で作ろう ▼ Ignite 前日の夜中 © 2023 Yuta
Matsumura.
#fukuten © 2023 Yuta Matsumura. Azure AI Speech
#fukuten Azure AI Speech とは © 2023 Yuta Matsumura. テキスト読み上げ
リアルタイム翻訳 話者の認識 カスタムキーワード 音声コマンド 音声テキスト変換 Azure AI 音声 | Microsoft Azure
#fukuten Azure Cognitive Services ▼ Azure Applied AI Services ▼
Azure AI Services © 2023 Yuta Matsumura.
#fukuten © 2023 Yuta Matsumura. ①PCマイクで 音声入力 ②文字起こし &翻訳 ③英&日の出力
④テキストファイル に保存
#fukuten Azure AI Speech とは © 2023 Yuta Matsumura. 音声テキスト変換
テキスト読み上げ リアルタイム翻訳 話者の認識 カスタムキーワード 音声コマンド
#fukuten 候補言語 • Azure AI Speech でオーディオから検出する言語の指定 • 最大10個の候補を指定可能 •
“ja-JP”, “en-US” などを BCP-47 形式で指定 (言語+ロケール) • 同一言語で複数ロケールは指定不可 (例:“en-US”, “en-GB”) © 2023 Yuta Matsumura. 言語サポート - 音声サービス - Azure AI services | Microsoft Learn
#fukuten 言語識別 (Language identification / LID) 開始時識別 (1回識別) オーディオの最初の数秒間で言語の識別を1回行う 継続的識別
オーディオが再生している間は言語の識別を継続的に行う © 2023 Yuta Matsumura. 言語識別 - Speech サービス - Azure AI services | Microsoft Learn
#fukuten 翻訳エンジンのイベント イベント 内容 Canceled 音声からテキスト/合成への翻訳が取り消されたことを通知します。 Recognized 最終的な認識結果が受信されたことを通知します。 Recognizing 中間認識結果が受信されたことを通知します。
SessionStarted セッション開始イベントのイベント ハンドラーを定義します。 SessionStopped セッション停止イベントのイベント ハンドラーを定義します。 SpeechEndDetected 音声終了検出イベントのイベント ハンドラーを定義します。 SpeechStartDetected 音声開始検出イベントのイベント ハンドラーを定義します。 Synthesizing 変換合成結果が受信されたことを通知します。 © 2023 Yuta Matsumura. TranslationRecognizer クラス (Microsoft.CognitiveServices.Speech.Translation) - Azure for .NET Developers | Microsoft Learn
#fukuten TranslationRecognizer.Recognized イベント TranslationRecognitionEventArgs クラス (イベント引数) Result プロパティ (TranslationRecognitionResult クラス)
Reason プロパティ:音声認識結果 Text プロパティ:識別されたテキスト Translations プロパティ:翻訳結果 © 2023 Yuta Matsumura.
#fukuten ライブデモ © 2023 Yuta Matsumura. speech translator ミキサー
#fukuten ソースコード © 2023 Yuta Matsumura.
#fukuten tsubakimoto/speech-translator https://github.com/tsubakimoto/speech-translator © 2023 Yuta Matsumura.
#fukuten // 音声翻訳の構成 var config = SpeechTranslationConfig.FromEndpoint( endpointUrl, subscriptionKey); config.SpeechRecognitionLanguage
= "en-US"; config.AddTargetLanguage("ja-JP"); var detectConfig = AutoDetectSourceLanguageConfig.FromLanguages( [config.SpeechRecognitionLanguage]); var stopTranslation = new TaskCompletionSource<int>(); © 2023 Yuta Matsumura.
#fukuten // 既定の音声入力デバイスから識別 using (var audioInput = AudioConfig.FromDefaultMicrophoneInput()) using (var
recognizer = new TranslationRecognizer( config, detectConfig, audioInput)) { // 識別結果受信時のイベント処理 recognizer.Recognized += (s, e) => { 次のスライド }; // 継続的識別の開始 await recognizer.StartContinuousRecognitionAsync() .ConfigureAwait(false); // 継続的識別の停止 Task.WaitAny(new[] { stopTranslation.Task }); await recognizer.StopContinuousRecognitionAsync() .ConfigureAwait(false); } © 2023 Yuta Matsumura.
#fukuten // 識別結果受信時のイベント処理 recognizer.Recognized += (s, e) => { var
result = e.Result; if (result.Reason == ResultReason.TranslatedSpeech) { using (var sw = new StreamWriter(_filePath, true, Encoding.UTF8)) { Console.WriteLine($"{result.Text}"); // 識別テキストの標準出力 sw.WriteLine($"{result.Text}"); // 識別テキストのファイル出力 foreach (var element in result.Translations) { Console.WriteLine($"{element.Value}");// 翻訳テキストの標準出力 sw.WriteLine($"{element.Value}"); // 翻訳テキストのファイル出力 } } } }; © 2023 Yuta Matsumura.
#fukuten GitHub Codespaces GitHub 上にホストされる仮想マシンを使用して、 オンライン上に開発環境を構築することができます。 devcontainer.json をリポジトリに保管している場合、 記載されている構成がセットアップされます。 ©
2023 Yuta Matsumura.
#fukuten https://github.com/github/dotnet-codespaces © 2023 Yuta Matsumura.
#fukuten tsubakimoto/speech-translator © 2023 Yuta Matsumura. AOAIで色々やりたい・・・ .NET MAUI でモバイル版を作りたい
PR 待ってます!
#fukuten ご清聴ありがとうございました © 2023 Yuta Matsumura.