src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php
public function getAcceptParameter(TtsAudioFormat $format, array $additionalData = []): string
    {
        $audioFormat = self::$formatMapping[$format->getFormat()] ?? '';

        if (empty($audioFormat)) {
            throw new InvalidAudioFormatCodeException($format->getFormat());
        }

        $accept = array_merge([$audioFormat], $this->processAdditionalParameters($format, $additionalData));

        return implode(";", $accept);
    }
public function getAcceptParameter(TtsAudioFormat $format, array $additionalData = []): string
    {
        $audioFormat = self::$formatMapping[$format->getFormat()] ?? '';

        if (empty($audioFormat)) {
            throw new InvalidAudioFormatCodeException($format->getFormat());
        }

        $accept = array_merge([$audioFormat], $this->processAdditionalParameters($format, $additionalData));

        return implode(";", $accept);
    }
public function getAcceptParameter ( TtsAudioFormat $ format , array $ additionalData = [ ] ) : string { $ audioFormat = self :: $ formatMapping [ $ format -> getFormat ( ) ] ?? '' ; if ( empty ( $ audioFormat ) ) { throw new InvalidAudioFormatCodeException ( $ format -> getFormat ( ) ) ; } $ accept = array_merge ( [ $ audioFormat ] , $ this -> processAdditionalParameters ( $ format , $ additionalData ) ) ; return implode ( ";" , $ accept ) ; }
Returns the string containing the accept parameter required for TTS.
It specifies audio format, sample rate and additional params if any

@param TtsAudioFormat $format
@param array          $additionalData

@throws InvalidAudioFormatCodeException
@throws InvalidAudioFormatParameterException

@return string
Returns the string containing the accept parameter required for TTS . It specifies audio format sample rate and additional params if any