SpeechSynthesisRequest Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. SpeechSynthesisRequest
- com.
Implements
public class SpeechSynthesisRequest
implements java.lang.AutoCloseable
Constructor Summary
| Constructor | Description | |
|---|---|---|
| SpeechSynthesisRequest(SpeechSynthesisRequest.SpeechSynthesisRequestInputType inputType) | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| synchronized void |
close()
Releases the resources held by the request. |
| synchronized void | finishInput() |
|
Speech |
getInputStream()
Gets the input stream for the speech synthesis request. |
|
Safe |
getRequestHandle() |
| void | sendTextPiece(String text) |
| void |
setPitch(String pitch)
Sets the pitch of the voice. |
| void |
setRate(String rate)
Sets the speaking rate of the voice. |
| void |
setStyle(String style)
Sets the style of the voice. |
| void |
setTemperature(double temperature)
Sets the temperature for voice synthesis. |
| void |
setVolume(String volume)
Sets the volume of the voice. |
Methods inherited from java.lang.Object
Constructor Details
SpeechSynthesisRequest
public SpeechSynthesisRequest(SpeechSynthesisRequest.SpeechSynthesisRequestInputType inputType)
Parameters:
Method Details
close
public synchronized void close()
Releases the resources held by the request. If the input has not been finished yet, it is finished first, so that a synthesis that is waiting for more input can complete. Calling close() more than once is allowed.
finishInput
public synchronized void finishInput()
getInputStream
public SpeechSynthesisRequest.SpeechSynthesisInputStream getInputStream()
Gets the input stream for the speech synthesis request.
Returns:
getRequestHandle
public SafeHandle getRequestHandle()
sendTextPiece
public void sendTextPiece(String text)
Parameters:
setPitch
public void setPitch(String pitch)
Sets the pitch of the voice.
Parameters:
setRate
public void setRate(String rate)
Sets the speaking rate of the voice.
Parameters:
setStyle
public void setStyle(String style)
Sets the style of the voice.
Parameters:
setTemperature
public void setTemperature(double temperature)
Sets the temperature for voice synthesis.
Parameters:
setVolume
public void setVolume(String volume)
Sets the volume of the voice.
Parameters: