charla / charla-php-sdk
PHP Interface to CharlaAI API
1.0.0
2024-04-04 14:41 UTC
Requires
- php: ^8.0
- php-http/client-common: ^2.7
- php-http/discovery: ^1.18
- psr/http-factory: ^1.0
Requires (Dev)
- fakerphp/faker: ^1.23
- guzzlehttp/psr7: ^2.5
- php-http/guzzle7-adapter: ^1.0
- phpunit/phpunit: ^9.6|^10
- symfony/var-dumper: ^6.0
- vimeo/psalm: ^5.12
This package is auto-updated.
Last update: 2025-02-17 03:08:33 UTC
README
Charla SDK for PHP
Getting started
Install
Install the SDK using Composer.
composer require charla/charla-php-sdk
Usage
Initialize client
$factory = new \CharlaAI\Charla\Transport\HttpTransportFactory(); $transport = $factory->create(new \CharlaAI\Charla\Options('TOKEN', 'https://charla.pro')) $client = new \CharlaAI\Charla\Http\Client($transport);
Transcribe audio
use CharlaAI\Charla\Http\Methods\Business\v1\Chat; $client = new \CharlaAI\Charla\Http\Client($transport); $audio = fopen('audio.mp3', 'r'); $client->call(Chat::class)->transcribe($audio, $add_language, $diarize, $with_timestamp, $format);
List history
use CharlaAI\Charla\Http\Methods\Business\v1\Chat; $client = new \CharlaAI\Charla\Http\Client($transport); $client->call(Chat::class)->list($page, $per_page, $from, $to);
Get history
use CharlaAI\Charla\Http\Methods\Business\v1\Chat; $client = new \CharlaAI\Charla\Http\Client($transport); $client->call(Chat::class)->get($id);
Contributing to the SDK
Please refer to CONTRIBUTING.md.
Security
If you discover any security related issues, please email support@charla.pro instead of using the issue tracker.
Getting help/support
If you need help setting up or configuring the PHP SDK please head over to the support@charla.pro.
License
Licensed under the MIT license, see LICENSE