PHP code example of littlefish / uberduck

1. Go to this page and download the library: Download littlefish/uberduck library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

littlefish / uberduck example snippets


$response = uberduck->listVoices($payload);

$response = uberduck->listVoiceSamples($voiceModelUuid);

$response = uberduck->listBackingTracks();
// or
$response = uberduck->listBackingTracks($payload);

$response = uberduck->generateLyrics($payload);

$response = uberduck->generateFreestyle($payload);

/*
  $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);
 php
'uberduck' => [
    'api_key' => 'your-uberduck-key',
    'api_secret' => 'your-uberduck-secret-key',
    'api_host' => 'uberduck-api-host'
]