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
660
米国カンファレンスで活躍した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
re:Invent の裏でアップデートされていた .NET Aspire で統合するAWS のクラウドリソース
tsubakimoto_s
1
23
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
230
Microsoft Entra External IDとAzure AD B2C
tsubakimoto_s
0
630
Minimal Observability on Minimal API
tsubakimoto_s
0
72
ワークフローのコピペを自作で解消した話
tsubakimoto_s
0
50
Azure AI ことはじめ
tsubakimoto_s
0
560
Azureのコアサーバーレス Azure Functions
tsubakimoto_s
0
560
GitHub Codespaces Updates
tsubakimoto_s
0
490
.NET 8 がリリース直前だから振り返る
tsubakimoto_s
0
580
Other Decks in Technology
See All in Technology
Active Directory攻防
cryptopeg
PRO
8
5.6k
事業モメンタムを生み出すプロダクト開発
macchiitaka
0
100
クラウド関連のインシデントケースを収集して見えてきたもの
lhazy
8
1.4k
AWS Well-Architected Frameworkで学ぶAmazon ECSのセキュリティ対策
umekou
2
150
AWSアカウントのセキュリティ自動化、どこまで進める? 最適な設計と実践ポイント
yuobayashi
7
640
Potential EM 制度を始めた理由、そして2年後にやめた理由 - EMConf JP 2025
hoyo
2
2.8k
IoTシステム開発の複雑さを低減するための統合的アーキテクチャ
kentaro
1
120
Pwned Labsのすゝめ
ken5scal
2
460
What's new in Go 1.24?
ciarana
1
110
OPENLOGI Company Profile
hr01
0
60k
Visualize, Visualize, Visualize and rclone
tomoaki0705
9
83k
2/18 Making Security Scale: メルカリが考えるセキュリティ戦略 - Coincheck x LayerX x Mercari
jsonf
0
230
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Producing Creativity
orderedlist
PRO
344
40k
Git: the NoSQL Database
bkeepers
PRO
427
65k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
380
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
570
Code Reviewing Like a Champion
maltzj
521
39k
Facilitating Awesome Meetings
lara
52
6.2k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
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.