public class SynthesizeOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static class |
SynthesizeOptions.Builder
Builder.
|
static interface |
SynthesizeOptions.SpellOutMode
*For German voices,* indicates how the service is to spell out strings of individual letters.
|
static interface |
SynthesizeOptions.Voice
The voice to use for speech synthesis.
|
Modifier and Type | Method and Description |
---|---|
String |
accept()
Gets the accept.
|
String |
customizationId()
Gets the customizationId.
|
SynthesizeOptions.Builder |
newBuilder()
New builder.
|
Long |
pitchPercentage()
Gets the pitchPercentage.
|
Long |
ratePercentage()
Gets the ratePercentage.
|
String |
spellOutMode()
Gets the spellOutMode.
|
String |
text()
Gets the text.
|
List<String> |
timings()
Gets the timings.
|
String |
voice()
Gets the voice.
|
public SynthesizeOptions.Builder newBuilder()
public String text()
The text to synthesize.
public String accept()
The requested format (MIME type) of the audio. You can use the `Accept` header or the `accept` parameter to specify the audio format. For more information about specifying an audio format, see **Audio formats (accept types)** in the method description.
public String voice()
The voice to use for speech synthesis. If you omit the `voice` parameter, the service uses the US English `en-US_MichaelV3Voice` by default.
_For IBM Cloud Pak for Data,_ if you do not install the `en-US_MichaelV3Voice`, you must either specify a voice with the request or specify a new default voice for your installation of the service.
**See also:** * [Languages and voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices) * [Using the default voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices-use#specify-voice-default).
public String customizationId()
The customization ID (GUID) of a custom model to use for the synthesis. If a custom model is specified, it works only if it matches the language of the indicated voice. You must make the request with credentials for the instance of the service that owns the custom model. Omit the parameter to use the specified voice with no customization.
public String spellOutMode()
*For German voices,* indicates how the service is to spell out strings of individual letters. To indicate the pace of the spelling, specify one of the following values: * `default` - The service reads the characters at the rate at which it synthesizes speech for the request. You can also omit the parameter entirely to achieve the default behavior. * `singles` - The service reads the characters one at a time, with a brief pause between each character. * `pairs` - The service reads the characters two at a time, with a brief pause between each pair. * `triples` - The service reads the characters three at a time, with a brief pause between each triplet.
For more information, see [Specifying how strings are spelled out](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-params#params-spell-out-mode).
public Long ratePercentage()
The percentage change from the default speaking rate of the voice that is used for speech synthesis. Each voice has a default speaking rate that is optimized to represent a normal rate of speech. The parameter accepts an integer that represents the percentage change from the voice's default rate: * Specify a signed negative integer to reduce the speaking rate by that percentage. For example, -10 reduces the rate by ten percent. * Specify an unsigned or signed positive integer to increase the speaking rate by that percentage. For example, 10 and +10 increase the rate by ten percent. * Specify 0 or omit the parameter to get the default speaking rate for the voice.
The parameter affects the rate for an entire request.
For more information, see [Modifying the speaking rate](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-params#params-rate-percentage).
public Long pitchPercentage()
The percentage change from the default speaking pitch of the voice that is used for speech synthesis. Each voice has a default speaking pitch that is optimized to represent a normal tone of voice. The parameter accepts an integer that represents the percentage change from the voice's default tone: * Specify a signed negative integer to lower the voice's pitch by that percentage. For example, -5 reduces the tone by five percent. * Specify an unsigned or signed positive integer to increase the voice's pitch by that percentage. For example, 5 and +5 increase the tone by five percent. * Specify 0 or omit the parameter to get the default speaking pitch for the voice.
The parameter affects the pitch for an entire request.
For more information, see [Modifying the speaking pitch](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-params#params-pitch-percentage).
public List<String> timings()
An array that specifies whether the service is to return word timing information for all strings of the input text. Specify `words` as the element of the array to request word timing information. The service returns the start and end time of each word of the input. Specify an empty array or omit the parameter to receive no word timing information. Not supported for Japanese input text.
NOTE: This parameter only works for the `synthesizeUsingWebSocket` method.
Copyright © 2023 IBM Cloud. All rights reserved.