Search by

runapi-ai / openai-transcription

runapi

RunAPI OpenAI Transcription Composer package for PHP applications

v0.1.1 2026-09-04 10:17 UTC

README

Packagist License

Use the OpenAI Transcription PHP SDK to transcribe audio through RunAPI with a synchronous Composer client. JSON formats return associative arrays; text and subtitle formats return their exact strings.

Install

composer require runapi-ai/openai-transcription

Quick start

<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\OpenaiTranscription\OpenaiTranscriptionClient;

$client = new OpenaiTranscriptionClient(); // reads RUNAPI_API_KEY
$result = $client->speechToText->run('audio.mp3');

echo is_string($result) ? $result : $result['text'] . PHP_EOL;

Keep RUNAPI_API_KEY in the environment or your secret manager.

The result is an array for JSON response formats and a string for text or subtitle formats, whether the request completes directly or through an accepted Task. Use subscribe() to observe Task updates; terminal text, SRT, and VTT results remain strings.

Links

License

Licensed under the Apache License, Version 2.0.