All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.polly.model.SynthesizeSpeechResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Polly module holds the client classes that are used for communicating with Amazon Polly.

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.polly.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SynthesizeSpeechResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* Stream containing the synthesized speech. *

*/ private java.io.InputStream audioStream; /** *

* Specifies the type audio stream. This should reflect the OutputFormat parameter in your request. *

*
    *
  • *

    * If you request mp3 as the OutputFormat, the ContentType returned is * audio/mpeg. *

    *
  • *
  • *

    * If you request ogg_vorbis as the OutputFormat, the ContentType returned is * audio/ogg. *

    *
  • *
  • *

    * If you request pcm as the OutputFormat, the ContentType returned is * audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. *

    *
  • *
  • *

    * If you request json as the OutputFormat, the ContentType returned is * application/x-json-stream. *

    *
  • *
*

*

*/ private String contentType; /** *

* Number of characters synthesized. *

*/ private Integer requestCharacters; /** *

* Stream containing the synthesized speech. *

* * @param audioStream * Stream containing the synthesized speech. */ public void setAudioStream(java.io.InputStream audioStream) { this.audioStream = audioStream; } /** *

* Stream containing the synthesized speech. *

* * @return Stream containing the synthesized speech. */ public java.io.InputStream getAudioStream() { return this.audioStream; } /** *

* Stream containing the synthesized speech. *

* * @param audioStream * Stream containing the synthesized speech. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesizeSpeechResult withAudioStream(java.io.InputStream audioStream) { setAudioStream(audioStream); return this; } /** *

* Specifies the type audio stream. This should reflect the OutputFormat parameter in your request. *

*
    *
  • *

    * If you request mp3 as the OutputFormat, the ContentType returned is * audio/mpeg. *

    *
  • *
  • *

    * If you request ogg_vorbis as the OutputFormat, the ContentType returned is * audio/ogg. *

    *
  • *
  • *

    * If you request pcm as the OutputFormat, the ContentType returned is * audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. *

    *
  • *
  • *

    * If you request json as the OutputFormat, the ContentType returned is * application/x-json-stream. *

    *
  • *
*

*

* * @param contentType * Specifies the type audio stream. This should reflect the OutputFormat parameter in your * request.

*
    *
  • *

    * If you request mp3 as the OutputFormat, the ContentType returned is * audio/mpeg. *

    *
  • *
  • *

    * If you request ogg_vorbis as the OutputFormat, the ContentType * returned is audio/ogg. *

    *
  • *
  • *

    * If you request pcm as the OutputFormat, the ContentType returned is * audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. *

    *
  • *
  • *

    * If you request json as the OutputFormat, the ContentType returned * is application/x-json-stream. *

    *
  • *
*

*/ public void setContentType(String contentType) { this.contentType = contentType; } /** *

* Specifies the type audio stream. This should reflect the OutputFormat parameter in your request. *

*
    *
  • *

    * If you request mp3 as the OutputFormat, the ContentType returned is * audio/mpeg. *

    *
  • *
  • *

    * If you request ogg_vorbis as the OutputFormat, the ContentType returned is * audio/ogg. *

    *
  • *
  • *

    * If you request pcm as the OutputFormat, the ContentType returned is * audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. *

    *
  • *
  • *

    * If you request json as the OutputFormat, the ContentType returned is * application/x-json-stream. *

    *
  • *
*

*

* * @return Specifies the type audio stream. This should reflect the OutputFormat parameter in your * request.

*
    *
  • *

    * If you request mp3 as the OutputFormat, the ContentType returned * is audio/mpeg. *

    *
  • *
  • *

    * If you request ogg_vorbis as the OutputFormat, the ContentType * returned is audio/ogg. *

    *
  • *
  • *

    * If you request pcm as the OutputFormat, the ContentType returned * is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. *

    *
  • *
  • *

    * If you request json as the OutputFormat, the ContentType returned * is application/x-json-stream. *

    *
  • *
*

*/ public String getContentType() { return this.contentType; } /** *

* Specifies the type audio stream. This should reflect the OutputFormat parameter in your request. *

*
    *
  • *

    * If you request mp3 as the OutputFormat, the ContentType returned is * audio/mpeg. *

    *
  • *
  • *

    * If you request ogg_vorbis as the OutputFormat, the ContentType returned is * audio/ogg. *

    *
  • *
  • *

    * If you request pcm as the OutputFormat, the ContentType returned is * audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. *

    *
  • *
  • *

    * If you request json as the OutputFormat, the ContentType returned is * application/x-json-stream. *

    *
  • *
*

*

* * @param contentType * Specifies the type audio stream. This should reflect the OutputFormat parameter in your * request.

*
    *
  • *

    * If you request mp3 as the OutputFormat, the ContentType returned is * audio/mpeg. *

    *
  • *
  • *

    * If you request ogg_vorbis as the OutputFormat, the ContentType * returned is audio/ogg. *

    *
  • *
  • *

    * If you request pcm as the OutputFormat, the ContentType returned is * audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. *

    *
  • *
  • *

    * If you request json as the OutputFormat, the ContentType returned * is application/x-json-stream. *

    *
  • *
*

* @return Returns a reference to this object so that method calls can be chained together. */ public SynthesizeSpeechResult withContentType(String contentType) { setContentType(contentType); return this; } /** *

* Number of characters synthesized. *

* * @param requestCharacters * Number of characters synthesized. */ public void setRequestCharacters(Integer requestCharacters) { this.requestCharacters = requestCharacters; } /** *

* Number of characters synthesized. *

* * @return Number of characters synthesized. */ public Integer getRequestCharacters() { return this.requestCharacters; } /** *

* Number of characters synthesized. *

* * @param requestCharacters * Number of characters synthesized. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesizeSpeechResult withRequestCharacters(Integer requestCharacters) { setRequestCharacters(requestCharacters); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAudioStream() != null) sb.append("AudioStream: ").append(getAudioStream()).append(","); if (getContentType() != null) sb.append("ContentType: ").append(getContentType()).append(","); if (getRequestCharacters() != null) sb.append("RequestCharacters: ").append(getRequestCharacters()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SynthesizeSpeechResult == false) return false; SynthesizeSpeechResult other = (SynthesizeSpeechResult) obj; if (other.getAudioStream() == null ^ this.getAudioStream() == null) return false; if (other.getAudioStream() != null && other.getAudioStream().equals(this.getAudioStream()) == false) return false; if (other.getContentType() == null ^ this.getContentType() == null) return false; if (other.getContentType() != null && other.getContentType().equals(this.getContentType()) == false) return false; if (other.getRequestCharacters() == null ^ this.getRequestCharacters() == null) return false; if (other.getRequestCharacters() != null && other.getRequestCharacters().equals(this.getRequestCharacters()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAudioStream() == null) ? 0 : getAudioStream().hashCode()); hashCode = prime * hashCode + ((getContentType() == null) ? 0 : getContentType().hashCode()); hashCode = prime * hashCode + ((getRequestCharacters() == null) ? 0 : getRequestCharacters().hashCode()); return hashCode; } @Override public SynthesizeSpeechResult clone() { try { return (SynthesizeSpeechResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy