Google\Cloud\Speech\SpeechClient::getTempResource PHP Method

getTempResource() private method

Takes in a resource or string and makes sure it is available as a local file in order for the getID3 library to be able to analzye it.
private getTempResource ( resource | string $audio ) : resource
$audio resource | string
return resource
    private function getTempResource($audio)
    {
        $temp = tmpfile();
        is_string($audio) ? fwrite($temp, $audio) : stream_copy_to_stream($audio, $temp);
        return $temp;
    }