azure-docs-sdk-java/docs-ref-autogen/com.microsoft.cognitiveserv...

397 строки
33 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer"
name: "SpeechSynthesizer"
nameWithType: "SpeechSynthesizer"
summary: "Performs speech synthesis to speaker, file, or other audio output streams, and gets synthesized audio as result."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
methodsRef:
- "<xref href=\"java.lang.Object.clone()?alt=java.lang.Object.clone&text=clone\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.equals(java.lang.Object)?alt=java.lang.Object.equals&text=equals\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.finalize()?alt=java.lang.Object.finalize&text=finalize\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.getClass()?alt=java.lang.Object.getClass&text=getClass\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.hashCode()?alt=java.lang.Object.hashCode&text=hashCode\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.notify()?alt=java.lang.Object.notify&text=notify\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.notifyAll()?alt=java.lang.Object.notifyAll&text=notifyAll\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.toString()?alt=java.lang.Object.toString&text=toString\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait()?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait(long)?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait(long,int)?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
syntax: "public class **SpeechSynthesizer**</br> implements <xref href=\"java.lang.AutoCloseable?alt=java.lang.AutoCloseable&text=AutoCloseable\" data-throw-if-not-resolved=\"False\" />"
constructors:
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(com.microsoft.cognitiveservices.speech.EmbeddedSpeechConfig)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(EmbeddedSpeechConfig embeddedSpeechConfig)"
name: "SpeechSynthesizer(EmbeddedSpeechConfig embeddedSpeechConfig)"
nameWithType: "SpeechSynthesizer.SpeechSynthesizer(EmbeddedSpeechConfig embeddedSpeechConfig)"
summary: "Creates a new instance of Speech Synthesizer for embedded speech synthesis."
parameters:
- description: "embedded speech configuration."
name: "embeddedSpeechConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.EmbeddedSpeechConfig?alt=com.microsoft.cognitiveservices.speech.EmbeddedSpeechConfig&text=EmbeddedSpeechConfig\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesizer(EmbeddedSpeechConfig embeddedSpeechConfig)"
desc: "Creates a new instance of Speech Synthesizer for embedded speech synthesis. Uses the default speaker on the system for audio output. Added in version 1.19.0"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(com.microsoft.cognitiveservices.speech.EmbeddedSpeechConfig,com.microsoft.cognitiveservices.speech.audio.AudioConfig)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(EmbeddedSpeechConfig embeddedSpeechConfig, AudioConfig audioConfig)"
name: "SpeechSynthesizer(EmbeddedSpeechConfig embeddedSpeechConfig, AudioConfig audioConfig)"
nameWithType: "SpeechSynthesizer.SpeechSynthesizer(EmbeddedSpeechConfig embeddedSpeechConfig, AudioConfig audioConfig)"
summary: "Creates a new instance of Speech Synthesizer for embedded speech synthesis."
parameters:
- description: "embedded speech configuration."
name: "embeddedSpeechConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.EmbeddedSpeechConfig?alt=com.microsoft.cognitiveservices.speech.EmbeddedSpeechConfig&text=EmbeddedSpeechConfig\" data-throw-if-not-resolved=\"False\" />"
- description: "audio configuration."
name: "audioConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.audio.AudioConfig?alt=com.microsoft.cognitiveservices.speech.audio.AudioConfig&text=AudioConfig\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesizer(EmbeddedSpeechConfig embeddedSpeechConfig, AudioConfig audioConfig)"
desc: "Creates a new instance of Speech Synthesizer for embedded speech synthesis. If audioConfig is null, there is no audio output. Added in version 1.19.0"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(com.microsoft.cognitiveservices.speech.HybridSpeechConfig)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(HybridSpeechConfig hybridSpeechConfig)"
name: "SpeechSynthesizer(HybridSpeechConfig hybridSpeechConfig)"
nameWithType: "SpeechSynthesizer.SpeechSynthesizer(HybridSpeechConfig hybridSpeechConfig)"
summary: "Creates a new instance of Speech Synthesizer for hybrid speech synthesis."
parameters:
- description: "hybrid speech configuration."
name: "hybridSpeechConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.HybridSpeechConfig?alt=com.microsoft.cognitiveservices.speech.HybridSpeechConfig&text=HybridSpeechConfig\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesizer(HybridSpeechConfig hybridSpeechConfig)"
desc: "Creates a new instance of Speech Synthesizer for hybrid speech synthesis. Uses the default speaker on the system for audio output."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(com.microsoft.cognitiveservices.speech.HybridSpeechConfig,com.microsoft.cognitiveservices.speech.audio.AudioConfig)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(HybridSpeechConfig hybridSpeechConfig, AudioConfig audioConfig)"
name: "SpeechSynthesizer(HybridSpeechConfig hybridSpeechConfig, AudioConfig audioConfig)"
nameWithType: "SpeechSynthesizer.SpeechSynthesizer(HybridSpeechConfig hybridSpeechConfig, AudioConfig audioConfig)"
summary: "Creates a new instance of Speech Synthesizer for hybrid speech synthesis."
parameters:
- description: "hybrid speech configuration."
name: "hybridSpeechConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.HybridSpeechConfig?alt=com.microsoft.cognitiveservices.speech.HybridSpeechConfig&text=HybridSpeechConfig\" data-throw-if-not-resolved=\"False\" />"
- description: "audio configuration."
name: "audioConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.audio.AudioConfig?alt=com.microsoft.cognitiveservices.speech.audio.AudioConfig&text=AudioConfig\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesizer(HybridSpeechConfig hybridSpeechConfig, AudioConfig audioConfig)"
desc: "Creates a new instance of Speech Synthesizer for hybrid speech synthesis. If audioConfig is null, there is no audio output."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(com.microsoft.cognitiveservices.speech.SpeechConfig)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(SpeechConfig speechConfig)"
name: "SpeechSynthesizer(SpeechConfig speechConfig)"
nameWithType: "SpeechSynthesizer.SpeechSynthesizer(SpeechConfig speechConfig)"
summary: "Creates a new instance of Speech Synthesizer."
parameters:
- description: "speech configuration."
name: "speechConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.SpeechConfig?alt=com.microsoft.cognitiveservices.speech.SpeechConfig&text=SpeechConfig\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesizer(SpeechConfig speechConfig)"
desc: "Creates a new instance of Speech Synthesizer. Uses the default speaker on the system for audio output."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(com.microsoft.cognitiveservices.speech.SpeechConfig,com.microsoft.cognitiveservices.speech.AutoDetectSourceLanguageConfig,com.microsoft.cognitiveservices.speech.audio.AudioConfig)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(SpeechConfig speechConfig, AutoDetectSourceLanguageConfig autoDetectSourceLangConfig, AudioConfig audioConfig)"
name: "SpeechSynthesizer(SpeechConfig speechConfig, AutoDetectSourceLanguageConfig autoDetectSourceLangConfig, AudioConfig audioConfig)"
nameWithType: "SpeechSynthesizer.SpeechSynthesizer(SpeechConfig speechConfig, AutoDetectSourceLanguageConfig autoDetectSourceLangConfig, AudioConfig audioConfig)"
summary: "Creates a new instance of Speech Synthesizer."
parameters:
- description: "speech configuration."
name: "speechConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.SpeechConfig?alt=com.microsoft.cognitiveservices.speech.SpeechConfig&text=SpeechConfig\" data-throw-if-not-resolved=\"False\" />"
- description: "the configuration for auto detecting source language"
name: "autoDetectSourceLangConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.AutoDetectSourceLanguageConfig?alt=com.microsoft.cognitiveservices.speech.AutoDetectSourceLanguageConfig&text=AutoDetectSourceLanguageConfig\" data-throw-if-not-resolved=\"False\" />"
- description: "audio configuration."
name: "audioConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.audio.AudioConfig?alt=com.microsoft.cognitiveservices.speech.audio.AudioConfig&text=AudioConfig\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesizer(SpeechConfig speechConfig, AutoDetectSourceLanguageConfig autoDetectSourceLangConfig, AudioConfig audioConfig)"
desc: "Creates a new instance of Speech Synthesizer."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(com.microsoft.cognitiveservices.speech.SpeechConfig,com.microsoft.cognitiveservices.speech.audio.AudioConfig)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeechSynthesizer(SpeechConfig speechConfig, AudioConfig audioConfig)"
name: "SpeechSynthesizer(SpeechConfig speechConfig, AudioConfig audioConfig)"
nameWithType: "SpeechSynthesizer.SpeechSynthesizer(SpeechConfig speechConfig, AudioConfig audioConfig)"
summary: "Creates a new instance of Speech Synthesizer."
parameters:
- description: "speech configuration."
name: "speechConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.SpeechConfig?alt=com.microsoft.cognitiveservices.speech.SpeechConfig&text=SpeechConfig\" data-throw-if-not-resolved=\"False\" />"
- description: "audio configuration."
name: "audioConfig"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.audio.AudioConfig?alt=com.microsoft.cognitiveservices.speech.audio.AudioConfig&text=AudioConfig\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesizer(SpeechConfig speechConfig, AudioConfig audioConfig)"
desc: "Creates a new instance of Speech Synthesizer. If audioConfig is null, there is no audio output."
fields:
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.BookmarkReached"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.BookmarkReached"
name: "BookmarkReached"
nameWithType: "SpeechSynthesizer.BookmarkReached"
summary: "Defines event handler for bookmark reached event."
modifiers:
- "final"
field:
type: "<xref href=\"com.microsoft.cognitiveservices.speech.util.EventHandlerImpl?alt=com.microsoft.cognitiveservices.speech.util.EventHandlerImpl&text=EventHandlerImpl\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisBookmarkEventArgs?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisBookmarkEventArgs&text=SpeechSynthesisBookmarkEventArgs\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final EventHandlerImpl<SpeechSynthesisBookmarkEventArgs> BookmarkReached"
desc: "Defines event handler for bookmark reached event. Added in version 1.16.0"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SynthesisCanceled"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SynthesisCanceled"
name: "SynthesisCanceled"
nameWithType: "SpeechSynthesizer.SynthesisCanceled"
summary: "Defines event handler for synthesis canceled event."
modifiers:
- "final"
field:
type: "<xref href=\"com.microsoft.cognitiveservices.speech.util.EventHandlerImpl?alt=com.microsoft.cognitiveservices.speech.util.EventHandlerImpl&text=EventHandlerImpl\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs&text=SpeechSynthesisEventArgs\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final EventHandlerImpl<SpeechSynthesisEventArgs> SynthesisCanceled"
desc: "Defines event handler for synthesis canceled event."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SynthesisCompleted"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SynthesisCompleted"
name: "SynthesisCompleted"
nameWithType: "SpeechSynthesizer.SynthesisCompleted"
summary: "Defines event handler for synthesis completed event."
modifiers:
- "final"
field:
type: "<xref href=\"com.microsoft.cognitiveservices.speech.util.EventHandlerImpl?alt=com.microsoft.cognitiveservices.speech.util.EventHandlerImpl&text=EventHandlerImpl\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs&text=SpeechSynthesisEventArgs\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final EventHandlerImpl<SpeechSynthesisEventArgs> SynthesisCompleted"
desc: "Defines event handler for synthesis completed event."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SynthesisStarted"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SynthesisStarted"
name: "SynthesisStarted"
nameWithType: "SpeechSynthesizer.SynthesisStarted"
summary: "Defines event handler for synthesis started event."
modifiers:
- "final"
field:
type: "<xref href=\"com.microsoft.cognitiveservices.speech.util.EventHandlerImpl?alt=com.microsoft.cognitiveservices.speech.util.EventHandlerImpl&text=EventHandlerImpl\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs&text=SpeechSynthesisEventArgs\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final EventHandlerImpl<SpeechSynthesisEventArgs> SynthesisStarted"
desc: "Defines event handler for synthesis started event."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.Synthesizing"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.Synthesizing"
name: "Synthesizing"
nameWithType: "SpeechSynthesizer.Synthesizing"
summary: "Defines event handler for synthesizing event."
modifiers:
- "final"
field:
type: "<xref href=\"com.microsoft.cognitiveservices.speech.util.EventHandlerImpl?alt=com.microsoft.cognitiveservices.speech.util.EventHandlerImpl&text=EventHandlerImpl\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisEventArgs&text=SpeechSynthesisEventArgs\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final EventHandlerImpl<SpeechSynthesisEventArgs> Synthesizing"
desc: "Defines event handler for synthesizing event."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.VisemeReceived"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.VisemeReceived"
name: "VisemeReceived"
nameWithType: "SpeechSynthesizer.VisemeReceived"
summary: "Defines event handler for viseme received event."
modifiers:
- "final"
field:
type: "<xref href=\"com.microsoft.cognitiveservices.speech.util.EventHandlerImpl?alt=com.microsoft.cognitiveservices.speech.util.EventHandlerImpl&text=EventHandlerImpl\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisVisemeEventArgs?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisVisemeEventArgs&text=SpeechSynthesisVisemeEventArgs\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final EventHandlerImpl<SpeechSynthesisVisemeEventArgs> VisemeReceived"
desc: "Defines event handler for viseme received event. Added in version 1.16.0"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.WordBoundary"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.WordBoundary"
name: "WordBoundary"
nameWithType: "SpeechSynthesizer.WordBoundary"
summary: "Defines event handler for word boundary event."
modifiers:
- "final"
field:
type: "<xref href=\"com.microsoft.cognitiveservices.speech.util.EventHandlerImpl?alt=com.microsoft.cognitiveservices.speech.util.EventHandlerImpl&text=EventHandlerImpl\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisWordBoundaryEventArgs?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisWordBoundaryEventArgs&text=SpeechSynthesisWordBoundaryEventArgs\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final EventHandlerImpl<SpeechSynthesisWordBoundaryEventArgs> WordBoundary"
desc: "Defines event handler for word boundary event."
methods:
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeakSsml(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeakSsml(String ssml)"
name: "SpeakSsml(String ssml)"
nameWithType: "SpeechSynthesizer.SpeakSsml(String ssml)"
summary: "Execute the speech synthesis on SSML, synchronously."
parameters:
- description: "The SSML for synthesis."
name: "ssml"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesisResult SpeakSsml(String ssml)"
desc: "Execute the speech synthesis on SSML, synchronously."
returns:
description: "The synthesis result."
type: "<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisResult?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisResult&text=SpeechSynthesisResult\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeakSsmlAsync(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeakSsmlAsync(String ssml)"
name: "SpeakSsmlAsync(String ssml)"
nameWithType: "SpeechSynthesizer.SpeakSsmlAsync(String ssml)"
summary: "Execute the speech synthesis on SSML, asynchronously."
parameters:
- description: "The SSML for synthesis."
name: "ssml"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Future<SpeechSynthesisResult> SpeakSsmlAsync(String ssml)"
desc: "Execute the speech synthesis on SSML, asynchronously."
returns:
description: "A task representing the synthesis operation. The task returns a value of SpeechSynthesisResult."
type: "<xref href=\"java.util.concurrent.Future?alt=java.util.concurrent.Future&text=Future\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisResult?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisResult&text=SpeechSynthesisResult\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeakText(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeakText(String text)"
name: "SpeakText(String text)"
nameWithType: "SpeechSynthesizer.SpeakText(String text)"
summary: "Execute the speech synthesis on plain text, synchronously."
parameters:
- description: "The plain text for synthesis."
name: "text"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesisResult SpeakText(String text)"
desc: "Execute the speech synthesis on plain text, synchronously."
returns:
description: "The synthesis result."
type: "<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisResult?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisResult&text=SpeechSynthesisResult\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeakTextAsync(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.SpeakTextAsync(String text)"
name: "SpeakTextAsync(String text)"
nameWithType: "SpeechSynthesizer.SpeakTextAsync(String text)"
summary: "Execute the speech synthesis on plain text, asynchronously."
parameters:
- description: "The plain text for synthesis."
name: "text"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Future<SpeechSynthesisResult> SpeakTextAsync(String text)"
desc: "Execute the speech synthesis on plain text, asynchronously."
returns:
description: "A task representing the synthesis operation. The task returns a value of SpeechSynthesisResult."
type: "<xref href=\"java.util.concurrent.Future?alt=java.util.concurrent.Future&text=Future\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisResult?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisResult&text=SpeechSynthesisResult\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StartSpeakingSsml(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StartSpeakingSsml(String ssml)"
name: "StartSpeakingSsml(String ssml)"
nameWithType: "SpeechSynthesizer.StartSpeakingSsml(String ssml)"
summary: "Start the speech synthesis on SSML, synchronously."
parameters:
- description: "The SSML for synthesis."
name: "ssml"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesisResult StartSpeakingSsml(String ssml)"
desc: "Start the speech synthesis on SSML, synchronously."
returns:
description: "The synthesis result."
type: "<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisResult?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisResult&text=SpeechSynthesisResult\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StartSpeakingSsmlAsync(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StartSpeakingSsmlAsync(String ssml)"
name: "StartSpeakingSsmlAsync(String ssml)"
nameWithType: "SpeechSynthesizer.StartSpeakingSsmlAsync(String ssml)"
summary: "Start the speech synthesis on SSML, asynchronously."
parameters:
- description: "The SSML for synthesis."
name: "ssml"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Future<SpeechSynthesisResult> StartSpeakingSsmlAsync(String ssml)"
desc: "Start the speech synthesis on SSML, asynchronously."
returns:
description: "A task representing the synthesis operation. The task returns a value of SpeechSynthesisResult."
type: "<xref href=\"java.util.concurrent.Future?alt=java.util.concurrent.Future&text=Future\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisResult?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisResult&text=SpeechSynthesisResult\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StartSpeakingText(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StartSpeakingText(String text)"
name: "StartSpeakingText(String text)"
nameWithType: "SpeechSynthesizer.StartSpeakingText(String text)"
summary: "Start the speech synthesis on plain text, synchronously."
parameters:
- description: "The plain text for synthesis."
name: "text"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SpeechSynthesisResult StartSpeakingText(String text)"
desc: "Start the speech synthesis on plain text, synchronously."
returns:
description: "The synthesis result."
type: "<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisResult?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisResult&text=SpeechSynthesisResult\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StartSpeakingTextAsync(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StartSpeakingTextAsync(String text)"
name: "StartSpeakingTextAsync(String text)"
nameWithType: "SpeechSynthesizer.StartSpeakingTextAsync(String text)"
summary: "Start the speech synthesis on plain text, asynchronously."
parameters:
- description: "The plain text for synthesis."
name: "text"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Future<SpeechSynthesisResult> StartSpeakingTextAsync(String text)"
desc: "Start the speech synthesis on plain text, asynchronously."
returns:
description: "A task representing the synthesis operation. The task returns a value of SpeechSynthesisResult."
type: "<xref href=\"java.util.concurrent.Future?alt=java.util.concurrent.Future&text=Future\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SpeechSynthesisResult?alt=com.microsoft.cognitiveservices.speech.SpeechSynthesisResult&text=SpeechSynthesisResult\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StopSpeakingAsync()"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.StopSpeakingAsync()"
name: "StopSpeakingAsync()"
nameWithType: "SpeechSynthesizer.StopSpeakingAsync()"
summary: "Stop the synthesis, asynchronously."
syntax: "public Future<Void> StopSpeakingAsync()"
desc: "Stop the synthesis, asynchronously. This method will stop the playback and clear the unread data in <xref uid=\"com.microsoft.cognitiveservices.speech.audio.PullAudioOutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.microsoft.cognitiveservices.speech.audio.PullAudioOutputStream\"></xref>. Added in version 1.14.0"
returns:
description: "A task representing the asynchronous operation that stops the synthesis."
type: "<xref href=\"java.util.concurrent.Future?alt=java.util.concurrent.Future&text=Future\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.Void?alt=java.lang.Void&text=Void\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.close()"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.close()"
name: "close()"
nameWithType: "SpeechSynthesizer.close()"
summary: "Dispose of associated resources."
syntax: "public void close()"
desc: "Dispose of associated resources."
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getAuthorizationToken()"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getAuthorizationToken()"
name: "getAuthorizationToken()"
nameWithType: "SpeechSynthesizer.getAuthorizationToken()"
summary: "Gets the authorization token used to communicate with the service."
syntax: "public String getAuthorizationToken()"
desc: "Gets the authorization token used to communicate with the service."
returns:
description: "Authorization token."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getImpl()"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getImpl()"
name: "getImpl()"
nameWithType: "SpeechSynthesizer.getImpl()"
summary: "INTERNAL"
syntax: "public SafeHandle getImpl()"
desc: "INTERNAL"
returns:
description: "SafeHandle to <xref uid=\"com.microsoft.cognitiveservices.speech.SpeechSynthesizer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SpeechSynthesizer\"></xref>"
type: "<xref href=\"com.microsoft.cognitiveservices.speech.util.SafeHandle?alt=com.microsoft.cognitiveservices.speech.util.SafeHandle&text=SafeHandle\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getProperties()"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getProperties()"
name: "getProperties()"
nameWithType: "SpeechSynthesizer.getProperties()"
summary: "The collection of properties and their values defined for this Speech<wbr>Synthesizer."
syntax: "public PropertyCollection getProperties()"
desc: "The collection of properties and their values defined for this SpeechSynthesizer."
returns:
description: "The collection of properties and their values defined for this SpeechSynthesizer."
type: "<xref href=\"com.microsoft.cognitiveservices.speech.PropertyCollection?alt=com.microsoft.cognitiveservices.speech.PropertyCollection&text=PropertyCollection\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getVoicesAsync()"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getVoicesAsync()"
name: "getVoicesAsync()"
nameWithType: "SpeechSynthesizer.getVoicesAsync()"
summary: "Get the available voices, asynchronously."
syntax: "public Future<SynthesisVoicesResult> getVoicesAsync()"
desc: "Get the available voices, asynchronously. Added in version 1.16.0"
returns:
description: "A task representing the asynchronous operation that gets the voices."
type: "<xref href=\"java.util.concurrent.Future?alt=java.util.concurrent.Future&text=Future\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SynthesisVoicesResult?alt=com.microsoft.cognitiveservices.speech.SynthesisVoicesResult&text=SynthesisVoicesResult\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getVoicesAsync(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.getVoicesAsync(String locale)"
name: "getVoicesAsync(String locale)"
nameWithType: "SpeechSynthesizer.getVoicesAsync(String locale)"
summary: "Get the available voices, asynchronously."
parameters:
- description: "Specify the locale of voices, in BCP-47 format; or leave it empty to get all available voices."
name: "locale"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Future<SynthesisVoicesResult> getVoicesAsync(String locale)"
desc: "Get the available voices, asynchronously. Added in version 1.16.0"
returns:
description: "A task representing the asynchronous operation that gets the voices."
type: "<xref href=\"java.util.concurrent.Future?alt=java.util.concurrent.Future&text=Future\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.microsoft.cognitiveservices.speech.SynthesisVoicesResult?alt=com.microsoft.cognitiveservices.speech.SynthesisVoicesResult&text=SynthesisVoicesResult\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.setAuthorizationToken(java.lang.String)"
fullName: "com.microsoft.cognitiveservices.speech.SpeechSynthesizer.setAuthorizationToken(String token)"
name: "setAuthorizationToken(String token)"
nameWithType: "SpeechSynthesizer.setAuthorizationToken(String token)"
summary: "Sets the authorization token used to communicate with the service."
parameters:
- description: "Authorization token."
name: "token"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setAuthorizationToken(String token)"
desc: "Sets the authorization token used to communicate with the service. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. Otherwise, the synthesizer will encounter errors while speech synthesis."
type: "class"
desc: "Performs speech synthesis to speaker, file, or other audio output streams, and gets synthesized audio as result. Note: close() must be called in order to release underlying resources held by the object. Updated in version 1.16.0"
implements:
- "<xref href=\"java.lang.AutoCloseable?alt=java.lang.AutoCloseable&text=AutoCloseable\" data-throw-if-not-resolved=\"False\" />"
metadata: {}
package: "com.microsoft.cognitiveservices.speech"
artifact: com.microsoft.cognitiveservices.speech:client-sdk:1.38.0