fn start_speech_synthesis_task(
        &self,
        input: StartSpeechSynthesisTaskInput,
    ) -> RusotoFuture<StartSpeechSynthesisTaskOutput, StartSpeechSynthesisTaskError> {
        let request_uri = "/v1/synthesisTasks";

        let mut request = SignedRequest::new("POST", "polly", &self.region, &request_uri);
        request.set_content_type("application/x-amz-json-1.1".to_owned());

        let encoded = Some(serde_json::to_vec(&input).unwrap());
        request.set_payload(encoded);

        self.client.sign_and_dispatch(request, |response| {
            if response.status.as_u16() == 200 {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;

                    if body == b"null" || body.is_empty() {
                        body = b"{}".to_vec();
                    }

                    debug!("Response body: {:?}", body);
                    debug!("Response status: {}", response.status);
                    let result =
                        serde_json::from_slice::<StartSpeechSynthesisTaskOutput>(&body).unwrap();

                    result
                }))
            } else {
                Box::new(response.buffer().from_err().and_then(|response| {
                    Err(StartSpeechSynthesisTaskError::from_response(response))
                }))
            }
        })
    }
/// <p>Allows the creation of an asynchronous synthesis task, by starting a new <code>SpeechSynthesisTask</code>. This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status.</p>
Allows the creation of an asynchronous synthesis task, by starting a new SpeechSynthesisTask. This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status.
Allows the creation of an asynchronous synthesis task by starting a new SpeechSynthesisTask . This operation requires all the standard information needed for speech synthesis plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters ( OutputS3KeyPrefix and SnsTopicArn ) . Once the synthesis task is created this operation will return a SpeechSynthesisTask object which will include an identifier of this task as well as the current status .
fn start_speech_synthesis_task(
        &self,
        input: StartSpeechSynthesisTaskInput,
    ) -> RusotoFuture<StartSpeechSynthesisTaskOutput, StartSpeechSynthesisTaskError> {
        let request_uri = "/v1/synthesisTasks";
        let mut request = SignedRequest::new("POST", "polly", &self.region, &request_uri);
        request.set_content_type("application/x-amz-json-1.1".to_owned());
        let encoded = Some(serde_json::to_vec(&input).unwrap());
        request.set_payload(encoded);
        self.client.sign_and_dispatch(request, |response| {
            if response.status.as_u16() == 200 {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;
                    if body == b"null" || body.is_empty() {
                        body = b"{}".to_vec();
                    }
                    debug!("Response body: {:?}", body);
                    debug!("Response status: {}", response.status);
                    let result =
                        serde_json::from_slice::<StartSpeechSynthesisTaskOutput>(&body).unwrap();
                    result
                }))
            } else {
                Box::new(response.buffer().from_err().and_then(|response| {
                    Err(StartSpeechSynthesisTaskError::from_response(response))
                }))
            }
        })
    }
fn start_speech_synthesis_task ( & self , input : StartSpeechSynthesisTaskInput , ) -> RusotoFuture < StartSpeechSynthesisTaskOutput , StartSpeechSynthesisTaskError > { let request_uri = " " ; let mut request = SignedRequest :: new ( " " , " " , & self . region , & request_uri ) ; request . set_content_type ( " " . to_owned ( ) ) ; let encoded = Some ( serde_json :: to_vec ( & input ) . unwrap ( ) ) ; request . set_payload ( encoded ) ; self . client . sign_and_dispatch ( request , | response | { if response . status . as_u16 ( ) == 200 { Box :: new ( response . buffer ( ) . from_err ( ) . map ( | response | { let mut body = response . body ; if body == b" " || body . is_empty ( ) { body = b" " . to_vec ( ) ; } debug ! ( " " body ) ; debug ! ( " " response status ) ; let result = serde_json :: from_slice :: < StartSpeechSynthesisTaskOutput > ( & body ) . unwrap ( ) ; result } ) ) } else { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | { Err ( StartSpeechSynthesisTaskError :: from_response ( response ) ) } ) ) } } ) }
<p>Allows the creation of an asynchronous synthesis task, by starting a new <code>SpeechSynthesisTask</code>.
<p > Allows the creation of an asynchronous synthesis task by starting a new <code > SpeechSynthesisTask< / code > .
&self
input
StartSpeechSynthesisTaskInput
&self
input
StartSpeechSynthesisTaskInput