/* * Copyright 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. */ /* * Do not modify this file. This file is generated from the polly-2016-06-10.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.Polly.Model { /// /// Container for the parameters to the SynthesizeSpeech operation. /// Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must /// be valid, well-formed SSML. Some alphabets might not be available with all the voices /// (for example, Cyrillic might not be read at all by English voices) unless phoneme /// mapping is used. For more information, see How /// it Works. /// public partial class SynthesizeSpeechRequest : AmazonPollyRequest { private Engine _engine; private LanguageCode _languageCode; private List _lexiconNames = new List(); private OutputFormat _outputFormat; private string _sampleRate; private List _speechMarkTypes = new List(); private string _text; private TextType _textType; private VoiceId _voiceId; /// /// Gets and sets the property Engine. /// /// Specifies the engine (standard or neural) for Amazon Polly /// to use when processing input text for speech synthesis. For information on Amazon /// Polly voices and which voices are available in standard-only, NTTS-only, and both /// standard and NTTS formats, see Available /// Voices. /// /// /// /// NTTS-only voices /// /// /// /// When using NTTS-only voices such as Kevin (en-US), this parameter is required and /// must be set to neural. If the engine is not specified, or is set to standard, /// this will result in an error. /// /// /// /// Type: String /// /// /// /// Valid Values: standard | neural /// /// /// /// Required: Yes /// /// /// /// Standard voices /// /// /// /// For standard voices, this is not required; the engine parameter defaults to standard. /// If the engine is not specified, or is set to standard and an NTTS-only /// voice is selected, this will result in an error. /// /// public Engine Engine { get { return this._engine; } set { this._engine = value; } } // Check to see if Engine property is set internal bool IsSetEngine() { return this._engine != null; } /// /// Gets and sets the property LanguageCode. /// /// Optional language code for the Synthesize Speech request. This is only necessary if /// using a bilingual voice, such as Aditi, which can be used for either Indian English /// (en-IN) or Hindi (hi-IN). /// /// /// /// If a bilingual voice is used and no language code is specified, Amazon Polly uses /// the default language of the bilingual voice. The default language for any voice is /// the one returned by the DescribeVoices /// operation for the LanguageCode parameter. For example, if no language /// code is specified, Aditi will use Indian English rather than Hindi. /// /// public LanguageCode LanguageCode { get { return this._languageCode; } set { this._languageCode = value; } } // Check to see if LanguageCode property is set internal bool IsSetLanguageCode() { return this._languageCode != null; } /// /// Gets and sets the property LexiconNames. /// /// List of one or more pronunciation lexicon names you want the service to apply during /// synthesis. Lexicons are applied only if the language of the lexicon is the same as /// the language of the voice. For information about storing lexicons, see PutLexicon. /// /// [AWSProperty(Max=5)] public List LexiconNames { get { return this._lexiconNames; } set { this._lexiconNames = value; } } // Check to see if LexiconNames property is set internal bool IsSetLexiconNames() { return this._lexiconNames != null && this._lexiconNames.Count > 0; } /// /// Gets and sets the property OutputFormat. /// /// The format in which the returned output will be encoded. For audio stream, this will /// be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. /// /// /// /// When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1 channel /// (mono), little-endian format. /// /// [AWSProperty(Required=true)] public OutputFormat OutputFormat { get { return this._outputFormat; } set { this._outputFormat = value; } } // Check to see if OutputFormat property is set internal bool IsSetOutputFormat() { return this._outputFormat != null; } /// /// Gets and sets the property SampleRate. /// /// The audio frequency specified in Hz. /// /// /// /// The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". /// The default value for standard voices is "22050". The default value for neural voices /// is "24000". /// /// /// /// Valid values for pcm are "8000" and "16000" The default value is "16000". /// /// public string SampleRate { get { return this._sampleRate; } set { this._sampleRate = value; } } // Check to see if SampleRate property is set internal bool IsSetSampleRate() { return this._sampleRate != null; } /// /// Gets and sets the property SpeechMarkTypes. /// /// The type of speech marks returned for the input text. /// /// [AWSProperty(Max=4)] public List SpeechMarkTypes { get { return this._speechMarkTypes; } set { this._speechMarkTypes = value; } } // Check to see if SpeechMarkTypes property is set internal bool IsSetSpeechMarkTypes() { return this._speechMarkTypes != null && this._speechMarkTypes.Count > 0; } /// /// Gets and sets the property Text. /// /// Input text to synthesize. If you specify ssml as the TextType, /// follow the SSML format for the input text. /// /// [AWSProperty(Required=true)] public string Text { get { return this._text; } set { this._text = value; } } // Check to see if Text property is set internal bool IsSetText() { return this._text != null; } /// /// Gets and sets the property TextType. /// /// Specifies whether the input text is plain text or SSML. The default value is plain /// text. For more information, see Using /// SSML. /// /// public TextType TextType { get { return this._textType; } set { this._textType = value; } } // Check to see if TextType property is set internal bool IsSetTextType() { return this._textType != null; } /// /// Gets and sets the property VoiceId. /// /// Voice ID to use for the synthesis. You can get a list of available voice IDs by calling /// the DescribeVoices /// operation. /// /// [AWSProperty(Required=true)] public VoiceId VoiceId { get { return this._voiceId; } set { this._voiceId = value; } } // Check to see if VoiceId property is set internal bool IsSetVoiceId() { return this._voiceId != null; } } }