a method to synthesize speech from text
            
        :param message_text: string with text to synthesize
        :param voice_id: string with name of voice id in AWS polly to use
        :param output_format: string with file type of audio output
        :param sample_rate: string with the audio frequency specified in Hz
        :param stream_response: boolean to return a StreamingBody object 
        :return: dictionary with synthesized speech fields
        
        output:
        {
            'audio_stream': b'', # or StreamingBody
            'content_type': 'string',
            'request_characters': 123
        }
        
        from botocore.response import StreamingBody
        StreamingBody.read
        StreamingBody.close
        StreamingBody.set_socket_timeout
        
        Nicole: aussie female
        Russell: aussie male
        Gwyneth: irish female
        Geraint: welsh male
        Emma: english female
        Brian: english male
        Joey: american male (east coast)
        Matthew: american male (west coast)
        Karl: scandinavian male (heavy accent)
        Marlene: dutch female
        Ruben: dutch male
        Justin: male child
        Astrid: german female (heavy accent)
        Maxim: russian male (in Russian)

def synthesize(self, message_text, voice_id='Nicole', output_format='mp3', sample_rate='22050', stream_response=False):
    
        '''
            a method to synthesize speech from text
            
        :param message_text: string with text to synthesize
        :param voice_id: string with name of voice id in AWS polly to use
        :param output_format: string with file type of audio output
        :param sample_rate: string with the audio frequency specified in Hz
        :param stream_response: boolean to return a StreamingBody object 
        :return: dictionary with synthesized speech fields
        
        output:
        {
            'audio_stream': b'', # or StreamingBody
            'content_type': 'string',
            'request_characters': 123
        }
        
        from botocore.response import StreamingBody
        StreamingBody.read
        StreamingBody.close
        StreamingBody.set_socket_timeout
        
        Nicole: aussie female
        Russell: aussie male
        Gwyneth: irish female
        Geraint: welsh male
        Emma: english female
        Brian: english male
        Joey: american male (east coast)
        Matthew: american male (west coast)
        Karl: scandinavian male (heavy accent)
        Marlene: dutch female
        Ruben: dutch male
        Justin: male child
        Astrid: german female (heavy accent)
        Maxim: russian male (in Russian)
        '''
        
        title = '%s.synthesize' % self.__class__.__name__
        
    # validate inputs
        input_fields = {
            'message_text': message_text,
            'voice_id': voice_id,
            'output_format': output_format,
            'sample_rate': sample_rate
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)

    # construct speech params
        speech_params = {
            'OutputFormat': output_format,
            'Text': message_text,
            'TextType': 'text',
            'VoiceId': voice_id,
            'SampleRate': sample_rate
        }
    
    # send request for synthesis
        try:
            response = self.connection.synthesize_speech(**speech_params)
        except:
            raise AWSConnectionError(title)

    # convert output to pythonic
        response_details = self.ingest(response)
    
    # read audio stream
        if not stream_response:
            response_details['audio_stream'] = response_details['audio_stream'].read()
        
    # TODO usage client methods / format
        if self.usage_client:
            self.usage_client.update('polly', 'synthesis', response_details)

        return response_details