littlefish/uberduck
最新稳定版本:0.0.9
Composer 安装命令:
composer require littlefish/uberduck
包简介
Uberduck's Rest API for PHP
关键字:
README 文档
README
uberduck
Uberduck's Rest API for PHP. For the full document on Uberduck's API, please refer to the official document.
Documentation
Installation
To begin, you'll need to add the component to your composer.json
composer require littlefish/uberduck
After adding the component, update your packages using composer update or install them using composer install.
Environment variables
This library requires you to have following settings in your environment variables:
UBERDUCK_KEY=<your-uberduck-key> UBERDUCK_SECRET=<your-uberduck-secret-key> UBERDUCK_HOST=<uberduck-api-host> # optional
Laravel config (optional)
You can use this package with your Laravel project directly after installed. If you need to modify the default config, you can add a uberduck config key:
'uberduck' => [ 'api_key' => 'your-uberduck-key', 'api_secret' => 'your-uberduck-secret-key', 'api_host' => 'uberduck-api-host' ]
Usage
The following API methods are mostly following the official Uberduck document. You can find more detailed usage by reading the document. For the payloads(parameters), please find detailed description in the official document.
List Voices
Get information on available voices.
Example:
$response = uberduck->listVoices($payload);
List Voice Samples
Return sample outputs from the specified VoiceModel.
Example:
$response = uberduck->listVoiceSamples($voiceModelUuid);
List Backing Tracks
List backing tracks.
Example:
$response = uberduck->listBackingTracks(); // or $response = uberduck->listBackingTracks($payload);
Generate Lyrics
Example:
$response = uberduck->generateLyrics($payload);
Generate Freestyle
Example:
$response = uberduck->generateFreestyle($payload);
Prompt Builder
Custom prompt can be created through the PROMPT BUILDER tab in your Uberduck dashboard.
Example:
/* $payload should be the variables you want to POST to your prompt, not including the `variables` key. $payload = [ 'parameter' => 'value' ]; The function will stringify your $payload with following php object structure in the POST body: ['variables' => $payload] */ $response = uberduck->customPrompt($key, $payload);
统计信息
- 总下载量: 1.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-01-31