PawerAppsアプリで翻訳しておしゃべりさせたい
動画を公開しました。
https://youtu.be/ANZH9ileRT0
今回の動画で使用した数式を以下に記載しておきます。
データ接続:MicrosoftTranslator
必要なコントロール:TextInputCanvas、button、Dropdown、Audio
DropdownのItemsプロパティに↓
MicrosoftTranslator.SpeechLanguages()
Audio:自動再生オフ・ループオフ
AudioのMediaプロパティに↓
_speakmedia
AudioのStartプロパティに↓
_speakstart
翻訳ボタンのOnSelectプロパティには↓
//---原文
UpdateContext({_originaltext:TextInputCanvas1.Value});
//---翻訳
UpdateContext({_transtext:MicrosoftTranslator.Translate(_originaltext,Dropdown1.Selected.Code)});
//---おしゃべり内容
UpdateContext({_speakmedia:MicrosoftTranslator.TextToSpeech(_transtext,Dropdown1.Selected.Code)});
//---おしゃべりスタート
UpdateContext({_speakstart:true})