Developers

We aim to put Voiceful available to creative minds and companies around the globe that bring new digital voice experiences and services to the society. Check out our tools, documentation and example code, and request a free evaluation account.

DOCUMENTATION

Voiceful offers a set of voice and audio processing tools through a RESTful API for a SaaS access, and a SDK with native libraries for integration in standalone mobile, desktop or server applications.

Cloud API

You can check the full documentation here: https://cloud.voctrolabs.com/docs/api .

                        
  import time
  import requests # sudo pip install requests

  #set user credentials
  user = '[email protected]'
  password = 'yourpassword'

  # Python example that interacts with VOICEFUL VoScale API
  # It creates a new task, starts it and waits until 
  # processing have been finished

  url_vocloud = 'https://cloud.voctrolabs.com'

  if __name__ == '__main__':

    # CREATE TASK //////////////////////////////////////////

    print '*** CREATE TASK ***'

    #set parameters for transformation
    timestretch = 0.8;
    pitchshift = 3.0;

    payload = {
      "time_stretch_ratio": timestretch,
      "pitch_shift": pitchshift,
      "audio_upload_parts": 1
    }

    # Post request
    response_create = requests.post(url_vocloud + "/api/voscale/tasks",
                                    json=payload,
                                    auth=(user, password))

    print(response_create.json())

    # Then upload (PUT) audio file to S3 url address returned in 
    #response_create.json()["audio_upload_urls"][0]
    print "\n*** UPLOAD FILES ***"

    filepath = "test.wav"
    fh = open(filepath)
    audio_data_binary = fh.read()
    response_upload = requests.put(response_create.json()["audio_upload_urls"][0], data=audio_data_binary)

    print("returned ok?:" + str(response_upload.ok) + 
          " reason:" + response_upload.reason + 
          " status_code:" + str(response_upload.status_code))

    # START TASK ///////////////////////////////////////////
    print "\n*** START TASK ***"
    task_url = url_vocloud + "/api/voscale/tasks/" + 
               response_create.json()["id"].encode('utf-8')

    response_start = requests.post(task_url + "/start",
                                   auth=(user, password))

    print("returned ok?:" + str(response_start.ok) + 
          " reason:" + response_start.reason + 
          " status_code:" + str(response_start.status_code))

    # Check if task finished
    print "\n*** TASK PROCESSED? ***"

    print "Processing...";
    while True:
      time.sleep(1)  # delays for 1 seconds
      response_status = requests.get(task_url,
                                     auth=(user, password))

      if response_status.json()["status"] == 'finished' or 
         response_status.json()["status"] == 'failed':
        break
      else:
        print '.'

    print "** Output URL: " + response_status.json()['audio_url']

    # Download file
    response_download = requests.get(response_status.json()['audio_url'], 
                                     stream=True)
    if response_download.status_code == 200:
      with open("output.wav", 'wb') as f:
        for chunk in response_download.iter_content(1024):
          f.write(chunk)


                      
                        
  // PHP example that interacts with VOICEFUL VoScale API
  // It creates a new task, starts it and waits until 
  // processing have been finished

  //set user credentials
  $user = "[email protected]";
  $password = "yourpassword";

  $url_vocloud = "https://cloud.voctrolabs.com";

  // CREATE TASK //////////////////////////////////////////
  //set parameters for transformation
  $timestretch = 0.8;
  $pitchshift = 3.0;

  $postDataCreate = array(
    'time_stretch_ratio' => $timestretch,
    'pitch_shift' => $pitchshift,
    'audio_upload_parts' => 1
  );

  // Setup cURL
  $chCreate = curl_init($url_vocloud.'/api/voscale/tasks');
  curl_setopt_array($chCreate, array(
    CURLOPT_POST => TRUE,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HTTPHEADER => array(
        'Content-Type: application/json'
    ),

    CURLOPT_POSTFIELDS => json_encode($postDataCreate)
  ));

  curl_setopt($chCreate, CURLOPT_USERPWD, $user . ":" . $password);

  // Send the request
  $responseCreate = curl_exec($chCreate);

  curl_close($chCreate);

  echo "** Response from create task: ********\n".$responseCreate."\n";

  // Check for errors
  if($responseCreate === FALSE){
      die(curl_error($chCreate));
  }

  $responseCreate_obj = json_decode($responseCreate,true);

  // Then upload (PUT) audio file to S3 url address returned 
  // in $responseCreate_obj["audio_upload_urls"][0]
  
  $audio_fn = "test.wav";
  $audio = fopen($audio_fn, "rb");

  $chUpload = curl_init();
  curl_setopt($chUpload, CURLOPT_CONNECTTIMEOUT, 2);
  curl_setopt($chUpload, CURLOPT_HEADER, false);
  curl_setopt($chUpload, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($chUpload, CURLOPT_BINARYTRANSFER, 1);
  curl_setopt($chUpload, CURLOPT_URL, $responseCreate_obj["audio_upload_urls"][0]);

  curl_setopt($chUpload, CURLOPT_PUT, 1);
  curl_setopt($chUpload, CURLOPT_INFILE, $audio);
  curl_setopt($chUpload, CURLOPT_INFILESIZE, filesize($audio_fn));

  $responseUpload = curl_exec($chUpload);
  curl_close($chUpload);

  echo "\n** Response from upload audio to S3: *****\n".$responseUpload."\n";

  // START TASK ///////////////////////////////////////////
  $task_id = $responseCreate_obj["id"];
  $task_url = $url_vocloud."/api/voscale/tasks/".$task_id;

  // The data to send to the API
  $postDataStart = array(
    'task_url' => $task_url
  );

  // Setup cURL
  $chStart = curl_init($task_url."/start");
  curl_setopt_array($chStart, array(
    CURLOPT_POST => TRUE,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HTTPHEADER => array(
        'Content-Type: application/json'
    ),

    CURLOPT_POSTFIELDS => json_encode($postDataStart)
  ));

  curl_setopt($chStart, CURLOPT_USERPWD, $user . ":" . $password);
    
  // Send the request
  $responseStart = curl_exec($chStart);
  curl_close($chStart);

  echo "\n** Response from start task: ******\n".$responseStart."\n";

  // Check for errors
  if($responseStart === FALSE){
      die(curl_error($chStart));
  }

  $responseStart_obj = json_decode($responseStart,true);

  echo "\nProcessing...";

  while ( ($responseStatus_obj['status'] != 'failed') and 
          ($responseStatus_obj['status'] != 'finished') )
  {
    sleep(1);

    // Setup cURL
    $chStatus = curl_init($task_url);
    curl_setopt($chStatus,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($chStatus, CURLOPT_USERPWD, $user . ":" . $password);
    // Send the request
    $responseStatus = curl_exec($chStatus);
    curl_close($chStatus);

    $responseStatus_obj = json_decode($responseStatus,true);
    echo ".";
  }

  echo "\n\n** Response from status task: ******\n".$responseStatus."\n";

  // Check for errors
  if($responseStatus === FALSE){
      die(curl_error($chStatus));
  }

  //Decode the response
  $responseData_obj = json_decode($responseStatus, TRUE);

  //Print output audio generated
  echo "\n** Output URL: ".$responseData_obj["audio_url"]."\n";


                      

Standalone SDK

All tools available in the Voiceful API are also available as a Standalone SDK, which can be integrated as cross-platform C++ libraries. (SDK clients available upon request).

                        
  #include "VoTransLib_api.h"

  /***************************************************************
    C++ usage example for VOICEFUL VoTrans Stand Alone SDK
    The below code is incomplete, it lacks audio in/out that will
    be implemented using standard audio driver libraries or
    reading from audio files on disk
  ****************************************************************/

  //VoTrans object
  void* mVoTrans = NULL;

  //parameters
  float gain_val = 0.9f;
  float pitch_val = 3.f;
  float mTimbreParameters[5] = { 0.5f, 0.6f, 0.7f, 0.55f, 0.5f };
  float vibratodepth_val = 0.2f;
  float vibratofreq_val = 0.3f;
  float robot_val = 0.0f;
  float alien_val = 0.0f;
  float autotune_val = 0.0f;
  float harmonizer_val = 0.0f;

  //INITIALIZATION OF THE LIBRARY
  int init()
  {
    int mnCh = 2; //number of channels
    float mSampleRate = 44100.f; 
    int mBlockSize = 256;
    
    mVoTrans = VT_Create();
          
    //CONFIGURATION
    int highQuality = 1;
    int noisy = 0;
    int bypass = 0;
    VT_Configure(mnCh, mSampleRate, mBlockSize, 
                 highQuality, noisy, bypass, mVoTrans);
    VT_SetPreAnalysis(NULL, mVoTrans);
    VT_BeginProcess(mVoTrans);
  }

  //PROCESS (in loop)
  //This function will be the audio driver callback if used in realtime or 
  //called in a loop while reading from a disk file or memory buffer if 
  //transforming offline samples
  void ProcessCallback(float* inbuffer, float* outbuffer)
  {
    //set parameters (e.g. from gui)
    VT_SetGainParameter(gain_val, mVoTrans);

    VT_SetPitchTranspositionInSemitonesParameter(pitch_val, mVoTrans);
        
    VT_SetTimbreParameters(mTimbreParameters, mVoTrans);

    VT_SetVibratoDepthParameter(vibratodepth_val, mVoTrans);
    VT_SetVibratoFreqParameter(vibratofreq_val, mVoTrans);

    VT_SetRobotParameter(robot_val, mVoTrans);
    VT_SetAlienParameter(alien_val, mVoTrans);
    VT_SetAutoTuneParameter(autotune_val, mVoTrans);
    VT_SetHarmonizerParameter(harmonizer_val, mVoTrans);
    
    //inbuffer & outbuffer memory is allocated by the user, 
    //DoProcessFloat fills the outbuffer with a maximum of 
    //configured blocksize (e.g. mBlockSize=256)
    int n = VT_DoProcessFloat(inbuffer, outbuffer, mVoTrans);
  }  
    
  //DESTROY
  void end()
  {
    VT_EndProcess(mVoTrans);
    VT_Destroy(mVoTrans);
  }


                      

TOOLKIT FEATURES

Voice generation | VoSyn

Our expressive voice generation approach, based on Deep Learning, was initially developed to generate artificial singing voice with high realism. It can learn a model from existing recordings of any individual and generate new speech or singing content. +More info

Voice Transformation | VoTrans

We can transform an actor's voice into a monster vocalization for a film, change a male voice into a kid or elder voice, and integrate it in real-time in games, social apps, or music applications. +More info

Voice Alignment and Auto-tuning | VoAlign

VoAlign analyzes and automatically corrects a voice recording without losing quality. We can align it to a reference recording for lip-syncing or ADR, or apply auto-tuning automatically to an estimated musical key.
+More info

Voice Description | VoDesc

This voice analysis tool extracts acoustic and musical information from a voice recording. Data can be sent in real-time, or exported in a readable format to be used in applications such as visualization, classification, monitoring or singing rating. +More info

Time-scaling and Pitch-shifting | VoScale

Beyond voice signals, Voiceful includes also a high-quality time-scaling and pitch-shifting to process any audio content (music, field recordings, dialogues, etc). +More info

Mixing and FX | VoMix

VoMix works as a virtual DAW with all standard audio effects (autogain, compression, EQ, reverb, delay, panning, mixing, etc.) to deliver audio in a professional-like quality. +More info

CUSTOM DEVELOPMENTS

We can extend and customize our technologies for the specific needs of your project idea. Talk to us!

EVALUATION ACCOUNT

1-month access to Voiceful Cloud API for evaluation

Request us a free evaluation account and obtain the Terms of Use and Pricing information. (Account limited to evaluation purposes and only for professionals: companies, business individuals or research institutions).

TECHNOLOGY BACKGROUND

Voiceful combines +15 years of R&D expertise in audio and music technologies with latest artificial intelligence for voice generation. Our patented technologies originate from academic research carried out by Voctro Labs’ cofounders at MTG-UPF, and since 2011 they have been integrated in award-wining applications worldwide. Our technology portfolio is being continuously extended with recent research in the field.