学ぶ
エンジンクラス
AudioTextToSpeech

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。


コードサンプル
テキストを音声として出力
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リファレンス
プロパティ
IsLoaded
読み取り専用
複製されていません
並列読み取り
機能: Audio
AudioTextToSpeech.IsLoaded:boolean

IsPlaying
Robloxのセキュリティ
並列読み取り
機能: Audio
AudioTextToSpeech.IsPlaying:boolean

Looping
並列読み取り
機能: Audio
AudioTextToSpeech.Looping:boolean

Pitch
並列読み取り
機能: Audio
AudioTextToSpeech.Pitch:number

PlaybackSpeed
並列読み取り
機能: Audio
AudioTextToSpeech.PlaybackSpeed:number

Speed
並列読み取り
機能: Audio
AudioTextToSpeech.Speed:number

Text
並列読み取り
機能: Audio
AudioTextToSpeech.Text:string

TimeLength
読み取り専用
複製されていません
並列読み取り
機能: Audio
AudioTextToSpeech.TimeLength:number

TimePosition
並列読み取り
機能: Audio
AudioTextToSpeech.TimePosition:number

VoiceId
並列読み取り
機能: Audio
AudioTextToSpeech.VoiceId:string

Volume
並列読み取り
機能: Audio
AudioTextToSpeech.Volume:number

方法
GetConnectedWires
機能: Audio
AudioTextToSpeech:GetConnectedWires(pin:string):{Wire}
パラメータ
pin:string
戻り値

GetWaveformAsync
イールド
機能: Audio
AudioTextToSpeech:GetWaveformAsync(
timeRange:NumberRange, samples:number
パラメータ
timeRange:NumberRange
samples:number
戻り値

LoadAsync
イールド
機能: Audio
AudioTextToSpeech:LoadAsync():Enum.AssetFetchStatus

Pause
機能: Audio
AudioTextToSpeech:Pause():()
戻り値
()

Play
機能: Audio
AudioTextToSpeech:Play():()
戻り値
()

Unload
機能: Audio
AudioTextToSpeech:Unload():()
戻り値
()

イベント
Ended
機能: Audio
AudioTextToSpeech.Ended():RBXScriptSignal

Looped
機能: Audio
AudioTextToSpeech.Looped():RBXScriptSignal

WiringChanged
機能: Audio
AudioTextToSpeech.WiringChanged(
connected:boolean, pin:string, wire:Wire, instance:Instance
パラメータ
connected:boolean
pin:string
wire:Wire
instance:Instance

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。