src/API/Implementation/TTS/IbmWatson/IbmWatsonTtsApi.php
protected function prepareTextToSpeechResponse(ResponseContextAbstract $context): TtsResponse
    {
        $response = new TtsResponse(
            $context->getRaw(),
            $this->getAudioFormatByContentTypeHeader($context->headers()),
            json_decode($context->getRequestContext()->getData(), true)['text']
        );

        return $response;
    }
protected function prepareTextToSpeechResponse(ResponseContextAbstract $context): TtsResponse
    {
        $response = new TtsResponse(
            $context->getRaw(),
            $this->getAudioFormatByContentTypeHeader($context->headers()),
            json_decode($context->getRequestContext()->getData(), true)['text']
        );

        return $response;
    }
protected function prepareTextToSpeechResponse ( ResponseContextAbstract $ context ) : TtsResponse { $ response = new TtsResponse ( $ context -> getRaw ( ) , $ this -> getAudioFormatByContentTypeHeader ( $ context -> headers ( ) ) , json_decode ( $ context -> getRequestContext ( ) -> getData ( ) , true ) [ 'text' ] ) ; return $ response ; }
Process response of text-to-speech request and prepare valid response

@param ResponseContextAbstract $context

@throws InvalidContentTypeException

@return TtsResponse
Process response of text - to - speech request and prepare valid response