エンジンクラス
AudioTextToSpeech
*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。
概要
プロパティ
方法
GetConnectedWires(pin: string):{Wire} |
GetWaveformAsync(timeRange: NumberRange,samples: number):{any} |
Pause():() |
Play():() |
Unload():() |
イベント
WiringChanged(connected: boolean,pin: string,wire: Wire,instance: Instance):RBXScriptSignal |
コードサンプル
テキストを音声として出力
local audioTextToSpeech: AudioTextToSpeech = Instance.new("AudioTextToSpeech")
audioTextToSpeech.Parent = workspace
audioTextToSpeech.Text = "こんにちは!テキストを音声に変換するのは楽しい!"
audioTextToSpeech.VoiceId = "1"
local deviceOutput = Instance.new("AudioDeviceOutput")
deviceOutput.Parent = workspace
local wire = Instance.new("Wire")
wire.Parent = workspace
wire.SourceInstance = audioTextToSpeech
wire.TargetInstance = deviceOutput
local count = 0
local connection = nil
connection = audioTextToSpeech.Ended:Connect(function()
audioTextToSpeech.Text = "私は" .. count .. "まで数えられます。なぜなら私はとても賢いからです"
audioTextToSpeech.VoiceId = "2"
audioTextToSpeech.TimePosition = 0
audioTextToSpeech:Play()
count += 1
if count > 10 then
connection:Disconnect()
end
end)
audioTextToSpeech:Play()APIリファレンス
プロパティ
方法
GetWaveformAsync
パラメータ
戻り値
Pause
AudioTextToSpeech:Pause():()
戻り値
()
Play
AudioTextToSpeech:Play():()
戻り値
()
Unload
AudioTextToSpeech:Unload():()
戻り値
()
イベント