PHP code example of runapi-ai / openai-transcription
1. Go to this page and download the library: Download runapi-ai/openai-transcription library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
runapi-ai / openai-transcription example snippets
unApi\OpenaiTranscription\OpenaiTranscriptionClient;
$client = new OpenaiTranscriptionClient(); // reads RUNAPI_API_KEY
$result = $client->speechToText->run('audio.mp3');
echo is_string($result) ? $result : $result['text'] . PHP_EOL;