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
850
米国カンファレンスで活躍した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
私のMCPの使い方
tsubakimoto_s
0
130
これからはじめる Model Context Protocol
tsubakimoto_s
0
49
Cloudflare の MCP サーバーをためしてみた
tsubakimoto_s
1
40
re:Invent の裏でアップデートされていた .NET Aspire で統合するAWS のクラウドリソース
tsubakimoto_s
1
110
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
310
Microsoft Entra External IDとAzure AD B2C
tsubakimoto_s
0
1.9k
Minimal Observability on Minimal API
tsubakimoto_s
0
120
ワークフローのコピペを自作で解消した話
tsubakimoto_s
0
86
Azure AI ことはじめ
tsubakimoto_s
0
680
Other Decks in Technology
See All in Technology
20251024_TROCCO/COMETAアップデート紹介といくつかデモもやります!_#p_UG 東京:データ活用が進む組織の作り方
soysoysoyb
0
130
会社を支える Pythonという言語戦略 ~なぜPythonを主要言語にしているのか?~
curekoshimizu
4
900
だいたい分かった気になる 『SREの知識地図』 / introduction-to-sre-knowledge-map-book
katsuhisa91
PRO
3
1.5k
アノテーション作業書作成のGood Practice
cierpa0905
PRO
0
240
データとAIで明らかになる、私たちの課題 ~Snowflake MCP,Salesforce MCPに触れて~ / Data and AI Insights
kaonavi
0
110
Dify on AWS 環境構築手順
yosse95ai
0
160
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
14
82k
GraphRAG グラフDBを使ったLLM生成(自作漫画DBを用いた具体例を用いて)
seaturt1e
1
160
abema-trace-sampling-observability-cost-optimization
tetsuya28
0
360
実践マルチモーダル検索!
shibuiwilliam
1
290
もう外には出ない。より快適なフルリモート環境を目指して
mottyzzz
13
11k
生成AI時代のPythonセキュリティとガバナンス
abenben
0
150
Featured
See All Featured
Building Adaptive Systems
keathley
44
2.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
How STYLIGHT went responsive
nonsquared
100
5.9k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Bash Introduction
62gerente
615
210k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Mobile First: as difficult as doing things right
swwweet
225
10k
A better future with KSS
kneath
239
18k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Code Reviewing Like a Champion
maltzj
526
40k
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.