Download the PHP package atlasaidev/atlasvoice-sdk without Composer

On this page you can find all versions of the php package atlasaidev/atlasvoice-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package atlasvoice-sdk

AtlasVoice PHP SDK

The PHP client for AtlasVoice Cloud text-to-speech: turn text into natural speech, make whole articles into one MP3 in the background, list voices, and read your plan and usage.

Install

Quick start

Create a project in the AtlasVoice dashboard and copy its secret key (av_live_…). Keep it on your server, for example in an environment variable.

'my-app/1.0' names your app in the service's logs, so support can find your calls.

Never put the secret key in a web page. For speech in visitors' browsers, use a publishable key (av_pub_…) with the JavaScript SDK. This client refuses a publishable key.

Long texts: audio jobs

Send a whole article once (up to 200,000 characters). The service makes it in the background and joins it into one MP3, kept for 48 hours.

Ask again no sooner than the poll_after_ms the service returns. Check the file's bytes and sha256 before you store it.

Natural voices (Premium): pass 'engine' => 'cloud' and a 'voice' id from voices( $lang, 'cloud' ), with that voice's locale as the language ('en-US', not 'en').

Voices

Voices change rarely: keep the list for a while instead of asking on every page.

Other calls

Method What it does
register( $platform, $site_url, $email, $name ) Asks for a project key (sent without a key)
account() Plan, engines, allowance, limits, licence and links, in one call
usage() This month's characters used and left
attach_license( $key ) / detach_license() Connect or remove a Pro licence
get_jobs( $ids ) / get_jobs_by_ref( $prefix ) / cancel_job( $id ) Manage jobs
health() Service status, file hosts and job limits (no key)

Results and errors

Every call returns a Result:

The full list of codes is in Error_Codes and the API documentation.

In a framework

Plain_Php::client() keeps the circuit breaker's state in memory. In a web app, pass a store backed by your cache, so one request learns that the service is down for the next:

Implement Contracts\State_Store (get, set, delete) and, if you want logs, Contracts\Logger. For full control, build Client yourself with your own Contracts\Http_Transport.

WordPress

The AtlasVoice WordPress plugin bundles this client in libs/AtlasVoice/Sdk and uses the WordPress HTTP API. To update it from this package:

src/Adapters is never copied: the WordPress plugin directory does not allow direct cURL calls.

Development

License

MIT. See LICENSE. The AtlasVoice WordPress plugin bundles this client under its own GPL licence; MIT is compatible with that.


All versions of atlasvoice-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package atlasaidev/atlasvoice-sdk contains the following files

Loading the files please wait ...