agentsclimarketplace

Responsivevoice php

Skill responsivevoice/skills/skills/responsivevoice-php

Cross-vendor coding-agent skills for the ResponsiveVoice text-to-speech (TTS) API

Install
npx -y skills add responsivevoice/skills --skill responsivevoice-php

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Call ResponsiveVoice text-to-speech from PHP with the official Composer SDK. Use when a PHP or Laravel task needs to synthesize speech, generate an MP3 from text, add TTS or voice output, list voices, or integrate `responsivevoice/sdk`. Covers the framework-free client and a Laravel service-provider setup. For the browser library, the Node client, or the raw REST API, use the responsivevoice-text-to-speech skill.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.0 KB, 944 tokens by cl100k_base, as published. Nobody here has run it

ResponsiveVoice PHP SDK

responsivevoice/sdk is the official Composer package for calling the ResponsiveVoice REST API from PHP. It synthesizes text to audio and lists voices; a call returns the raw MP3 bytes.

Writing PHP? Continue

This skill is for server-side PHP. For a different surface, stop and use the responsivevoice-text-to-speech skill instead:

  • A web page that speaks in the browser@responsivevoice/core.
  • A TypeScript or Node backend@responsivevoice/api-client.
  • Another language — the REST API directly.

Authentication (read before installing)

The SDK is server-to-server, so it needs both credentials:

  • X-API-Key — your registered website's identifier.
  • X-API-Secret — a real credential, shown once at creation. Keep it server-side; never commit it or ship it to a browser.

Pass them from the environment, never inline. Get them by registering a free account: copy the key from your website's "Your site code" snippet and create a secret under "Server-to-server API secrets" in the dashboard.

Install

composer require responsivevoice/sdk

Requires PHP 8.2+ and pulls in Guzzle as the HTTP client.

Synthesize speech

Build a Configuration, call SynthesisApi::v2TextSynthesizeGet(), and write the returned bytes to a file:

<?php

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

use GuzzleHttp\Client;
use ResponsiveVoice\Sdk\Api\SynthesisApi;
use ResponsiveVoice\Sdk\ApiException;
use ResponsiveVoice\Sdk\Configuration;

$config = (new Configuration())
    ->setApiKey('X-API-Key', getenv('RESPONSIVEVOICE_API_KEY'))
    ->setApiKey('X-API-Secret', getenv('RESPONSIVEVOICE_API_SECRET'));

$api = new SynthesisApi(new Client(), $config);

try {
    $audio = $api->v2TextSynthesizeGet('Hello from PHP', 'UK English Female');
} catch (ApiException $e) {
    fwrite(STDERR, "Synthesis failed (HTTP {$e->getCode()}): {$e->getMessage()}\n");
    exit(1);
}

file_put_contents('speech.mp3', $audio);

ApiException::getCode() is the HTTP status. The default host is the production API; override it with setHost() only to point at a different deployment.

List voices

use ResponsiveVoice\Sdk\Api\VoicesApi;

$api = new VoicesApi(new Client(), $config);

$all = $api->v2VoicesGet()->getVoices();
$australian = $api->v2VoicesByLanguageLangGet('en-AU')->getVoices();

foreach ($all as $voice) {
    printf("%s\t%s\t%s\n", $voice->getName(), $voice->getLang(), $voice->getGender() ?? '');
}

Laravel

Bind the SDK through a service provider and drive it from config, an Artisan command, or a job — including the Octane-safe credential setup: references/laravel.md.

Notes

Fetching the docs

Always read the ResponsiveVoice docs as Markdown, never HTML — append .md to any docs URL (https://docs.responsivevoice.org/guides/voice-selection.md). Start from:

What ships with it: 1 file

2.8 KB alongside SKILL.md

references/

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.