Book a specific voice

Description

Creates a new booking project to obtain a recording from a specific voice actor.

Arguments

= required
= only one of these is required
NameTypeDescriptionDefault value
script
textText that will be read by voice actors. Write instructions inside of [ ]. They won't count towards the word/character total. If you want to receive multiple files, submit the different parts as a JSON array, naming the key of each element anyway you wish (see advanced example below). The name of each key will be used to name the audio files.
talentID
stringUnique identifier of the voice actor wanted for the project.
title
stringDescriptive text about the project of up to 50 characters. This text is the first reference that voice actors will have about your project. Using it wisely will help you attract more and better voice actors.
syncedRecordingintegerSet this argument to "1" if the recording needs to be synced. For example: synchronization with a video or presentation. The price of the project will be 50% higher.0
testbooleanSet this argument to "1" to test this operation. When set to "1", the project won't affect your account balance and it will automatically get a fake read within 120 seconds.0
genderAndAgestringGender and age wanted for the read. Valid values can be obtained with the /genderAndAges operation.
languagestringLanguage (and regional accent) wanted for the read. Valid values can be obtained with the /languages operation.
pingstringUse it to be notified as the project has new reads in status "reviewable". Possible values are:
Empty: No notifications will be sent.
"email": A message will be sent to your account's email address.
A valid email address: A message will be sent to the given email address.
A valid URL: The given URL will be called via a "get" request, expecting a 200, 201, or 202 response. You may use as many URL parameters as you need.
remarkstextUse this field to provide additional information to the voice actors. For example: type of read (movie trailer voice, commercial, phone greeting, etc.), links to videos, links to other reads you like, links to other project, links to images, etc. Learn to provide great directions to voice actors.

Response example

{
  "project":{
    "id":"3",
    "user":"42",
    "status":"disposed",
    "fulfilmentType":"booking",
    "title":"Booking test project",
    "language":"eng-us",
    "genderAndAge":"youngAdultMale",
    "script":{
      "part001":"This is my script 1."
    },
    "price":0,
    "currency":"USD",
    "remarks":"Special instructions",
    "lifetime":"86000",
    "assignmentDuration":"609",
    "test":0,
    "created":1315692607,
    "units":"4",
    "genderAndAgeName":"Male | Young adult (20-39)",
    "languageName":"English - North America",
    "auditionScript":false,
    "reads":[
      {
        "status":"futureRead",
        "urls":{
          "part001":{
            "default":"https:\/\/voicebunny.com\/reads\/files\/3\/default\/part001",
            "original":"https:\/\/voicebunny.com\/reads\/files\/3\/original\/part001"
          }
        }
      }
    ],
    "auditions":false,
    "talendID":"81SQO",
    "syncedRecording":0,
    "excludePrevious":false,
    "extended":0,
    "extendedRequestedTime":false,
    "extensionLifetime":false,
    "prioritizeFavoriteListId":false
  },
  "timestamp":1571315378
}
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <project>
    <id>3</id>
    <user>42</user>
    <status>disposed</status>
    <fulfilmentType>booking</fulfilmentType>
    <title>Booking test project</title>
    <language>eng-us</language>
    <genderAndAge>youngAdultMale</genderAndAge>
    <script>
      <part001>This is my script 1.</part001>
    </script>
    <price>0</price>
    <currency>USD</currency>
    <remarks>Special instructions</remarks>
    <lifetime>86000</lifetime>
    <assignmentDuration>609</assignmentDuration>
    <test>0</test>
    <created>1315692607</created>
    <units>4</units>
    <genderAndAgeName>Male | Young adult (20-39)</genderAndAgeName>
    <languageName>English - North America</languageName>
    <auditionScript>0</auditionScript>
    <reads>
      <status>futureRead</status>
      <urls>
        <part001>
          <default>https://voicebunny.com/reads/files/3/default/part001</default>
          <original>https://voicebunny.com/reads/files/3/original/part001</original>
        </part001>
      </urls>
    </reads>
    <auditions>0</auditions>
    <talendID>81SQO</talendID>
    <syncedRecording>0</syncedRecording>
    <excludePrevious>0</excludePrevious>
    <extended>0</extended>
    <extendedRequestedTime>0</extendedRequestedTime>
    <extensionLifetime>0</extensionLifetime>
    <prioritizeFavoriteListId>0</prioritizeFavoriteListId>
  </project>
  <timestamp>1571315379</timestamp>
</project>

Errors

  • 5002: Your account balance is too low and you don't have a credit card on file we can automatically charge. Please add funds or your credit card info at http://voicebunny.com/account
  • 5005: The "title" argument cannot be empty. Please use a descriptive text about the project. This text is the first reference that voice actors will have about your project. Using it wisely will help you attract more and better voice actors.
  • 5007: The "language" argument is not valid. You can get the list of available languages and accents using the API operation /languages.
  • 5008: The "genderAndAge" argument is not valid. You can get the list of available "gender and ages" using the API operation /genderAndAges.
  • 5009: The "script" argument cannot be empty.
  • 5037: The "ping" argument should be an email address, an URL, "email", or be empty.
  • 5039: The "lifetime" argument should be a positive number, or it should be empty.
  • 5048: The "title" argument is too long. Please limit it to 100 characters.
  • 5073: The "price" argument must be at or above Mr. Bunny's suggested rate. Remember, better rewards attract better, faster voice actors.
  • 5080: Some parts of the script are empty, please remove them or add some information.
  • 5100: The "price" argument should be empty when posting projects with fulfillmentType = "booking". Projects of this type are not allowed to "name their own price" as VoiceBunny only offers fixed rates for each voice actor.
  • 5102: The "talentID" argument is not valid.
  • 5103: When fulfilmentType = booking, the 'talentID' argument should not be empty.
  • 5104: When posting a project with fulfillmentType = 'booking' and test = '1', talentID should be 81SQO.
  • 5106: Bummer! The talent you chose is not accepting bookings at this time. Please select another voice actor or contact Mr. Bunny for help.
  • 5109:
  • 5150:

Basic example

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2' )

import groovyx.net.http.*
import groovy.json.*
import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*

def projectData = [
	script: 'Hello world.',
	title: 'My Test Project',
	language: 'eng-us',
	genderAndAge: 'middleAgeMale',
	lifetime: 86400,
	talentID: 1,
	remarks: 'Special instructions'
]

http = new HTTPBuilder('https://api.voicebunny.com')
http.handler.success = {response, json -> return json}
http.handler.failure = {response, json -> throw new RuntimeException(json.error.code + ' ' + json.error.message)}
def voicebunnyUser = 'xxXXxx'
def voicebunnyToken = 'xxxxXXXXxxxxXXXX'
http.auth.basic voicebunnyUser, voicebunnyToken
def newProject = http.post(path: 'projects/addBooking', body: projectData, requestContentType: URLENC)
import java.io.*;
import java.net.*;
import java.util.*;
import java.util.Map.Entry;
import org.apache.commons.codec.binary.Base64;

public class Voicebunny {

    private String user = "xxXXxx";

    private String token = "xxxxXXXXxxxxXXXX";

    private String encodedAuthorization = "";

    private String host = "https://api.voicebunny.com";

    public Voicebunny() {
        String userpassword = user + ":" + token;
        encodedAuthorization = Base64.encodeBase64String(userpassword.getBytes());
    }

    public static void main(String[] args) throws IOException {
        Voicebunny vb = new Voicebunny();
        System.out.println(vb.postProject());
    }

    private String postProject() throws MalformedURLException, IOException, ProtocolException {
        Map<String, String> params = new HashMap<String, String>();
        params.put("script", "Hello world.");
        params.put("title", "My Test Project");
        params.put("language", "eng-us");
        params.put("genderAndAge", "middleAgeMale");
        params.put("lifetime", "86400");
        params.put("talentID", "1");
        params.put("remarks", "Special instructions");
        return post("projects/addBooking", params);
    }

    private String post(String resource, Map<String, String> params) throws UnsupportedEncodingException, MalformedURLException, IOException, ProtocolException {
        String data = "";
        for (Entry<String, String> entry : params.entrySet()) {
            if (!data.isEmpty()) {
                data += "&";
            }
            data += (URLEncoder.encode(entry.getKey(), "UTF-8") + "=" + URLEncoder.encode(entry.getValue(), "UTF-8"));
        }

        URL url = new URL(host + "/" + resource);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("POST");
        connection.setRequestProperty("Authorization", "Basic " + encodedAuthorization);
        connection.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream());
        wr.write(data);
        wr.flush();
        InputStream in = connection.getInputStream();
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        StringBuffer sb = new StringBuffer();
        String line = "";
        while ((line = reader.readLine()) != null) {
            sb.append(line);
        }
        wr.close();
        reader.close();
        return sb.toString();
    }

}
var postParams = {
    title: 'My Test Project',
    script: 'Hello world.',
    language: 'eng-us',
    genderAndAge: 'middleAgeMale',
    specialInstructions: 'Special instructions'
};

var requestParams = querystring.stringify(postParams);
var voicebunnyUser = 'xxXXxx';
var voicebunnyToken = 'xxxxXXXXxxxxXXXX';
var options = {
    host: 'api.voicebunny.com',
    port: 443,
    path: 'projects/addBooking',
    method: 'POST',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Content-Length': requestParams.length,
        'Authorization': 'Basic ' + new Buffer(voicebunnyUser + ':' + voicebunnyToken).toString('base64')
    }
};

var req = https.request(options, function (res) {
    res.setEncoding('utf8');
    res.on('data', function (data) {
        console.log(data);
    });
});
req.write(requestParams);
req.end();
<?php
$voicebunnyUser = 'xxXXxx';
$voicebunnyToken = 'xxxxXXXXxxxxXXXX';
$url_api = 'https://api.voicebunny.com/projects/addBooking';
$postVars = array(
	'title' => 'My Test Project',
	'language' => 'eng-us',
	'genderAndAge' => 'middleAgeMale',
	'script' => 'Hello world.',
	'remarks' => 'Special instructions',
	'lifetime' => 86400,
	'talentID' => 1,
);
$vars = http_build_query($postVars);
$opts = array(
	CURLOPT_URL => $url_api,
	CURLOPT_RETURNTRANSFER => TRUE,
	CURLOPT_INFILESIZE => -1,
	CURLOPT_TIMEOUT => 60,
	CURLOPT_SSL_VERIFYPEER => false,
	CURLOPT_POST => TRUE,
	CURLOPT_POSTFIELDS => $vars,
	CURLOPT_USERPWD => $voicebunnyUser . ':' . $voicebunnyToken,
);
$curl = curl_init();
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
print_r($response);
?>
import requests
import simplejson
from requests.auth import HTTPBasicAuth

url = 'https://api.voicebunny.com'
api_id = 'XX'
api_key = "xxxxXXXXxxxxXXXX"
req = requests.post(url+'/projects/addBooking',
   data={
        'title': 'My Test Project',
        'script': 'Hello world.',
        'language': 'eng-us',
        'genderAndAge': 'middleAgeMale',
        'lifetime': '86400',
        'talentID': '1',
        'remarks': 'Special instructions'
   }, 
   auth=HTTPBasicAuth(api_id, api_key),verify=False)
data = simplejson.loads(req.text)
response = data['project']
require 'faraday'
require 'faraday_middleware'

@conn = nil
@api_id = "XX"
@api_key = "xxxxXXXXxxxxXXXX"
resp = nil

@conn = Faraday.new(:url =>("https://"+ @api_id+":"+@api_key +"@api.voicebunny.com"),:ssl => {:verify => false}) do |builder|
	builder.use Faraday::Request::Multipart
	builder.use Faraday::Request::UrlEncoded
	builder.use Faraday::Response::ParseJson
	builder.use Faraday::Adapter::NetHttp		  
end

resp = @conn.post '/projects/addBooking.json', {
	script: 'Hello world.',
	title: 'My Test Project',
	language: 'eng-us',
	genderAndAge: 'middleAgeMale',
	lifetime: 86400,
	talentID: 1,
	remarks: 'Special instructions'
}

resp.body

Advanced example

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2' )

import groovyx.net.http.*
import groovy.json.*
import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*

def projectData = [
	script: '{
            "Part001":"[make voice like you are giving a speech] Hello world.",
            "Part002:"I am mr. VoiceBunny",
            "Part003":"[with animosity] I have to go! Bye!"
        }',
	title: 'Mr. VoiceBunny introduction',
	language: 'eng-us',
	genderAndAge: 'middleAgeMale',
	lifetime: 86400,
	talentID: 1
	remarks: 'I want a really friendly voice, in the Part002 please be enfatic.',
	syncedRecording: 1,
	ping: 'api@voicebunny.com'
]

http = new HTTPBuilder('https://api.voicebunny.com')
http.handler.success = {response, json -> return json}
http.handler.failure = {response, json -> throw new RuntimeException(json.error.code + ' ' + json.error.message)}
def voicebunnyUser = 'xxXXxx'
def voicebunnyToken = 'xxxxXXXXxxxxXXXX'
http.auth.basic voicebunnyUser, voicebunnyToken
def newProject = http.post(path: 'projects/addBooking', body: projectData, requestContentType: URLENC)
import java.io.*;
import java.net.*;
import java.util.*;
import java.util.Map.Entry;
import org.apache.commons.codec.binary.Base64;

public class Voicebunny {

    private String user = "xxXXxx";

    private String token = "xxxxXXXXxxxxXXXX";

    private String encodedAuthorization = "";

    private String host = "https://api.voicebunny.com";

    public Voicebunny() {
        String userpassword = user + ":" + token;
        encodedAuthorization = Base64.encodeBase64String(userpassword.getBytes());
    }

    public static void main(String[] args) throws IOException {
        Voicebunny vb = new Voicebunny();
        System.out.println(vb.postProject());
    }

    private String postProject() throws MalformedURLException, IOException, ProtocolException {
        Map<String, String> params = new HashMap<String, String>();
params.put("script", "{
            "Part001":"[make voice like you are giving a speech] Hello world.",
            "Part002":"I am mr. VoiceBunny",
            "Part003":"[with animosity] I have to go! Bye!"
        }");
        params.put("title", "Mr. VoiceBunny introduction");
        params.put("language", "eng-us");
        params.put("genderAndAge", "middleAgeMale");
        params.put("lifetime", "86400");
        params.put("talentID", "1");
        params.put("remarks", "I want a really friendly voice, in the Part002 please be enfatic.");
	params.put("timedRecording", "1,");
	params.put("ping", "api@voicebunny.com");
        return post("projects/addBooking", params);
    }

    private String post(String resource, Map<String, String> params) throws UnsupportedEncodingException, MalformedURLException, IOException, ProtocolException {
        String data = "";
        for (Entry<String, String> entry : params.entrySet()) {
            if (!data.isEmpty()) {
                data += "&";
            }
            data += (URLEncoder.encode(entry.getKey(), "UTF-8") + "=" + URLEncoder.encode(entry.getValue(), "UTF-8"));
        }

        URL url = new URL(host + "/" + resource);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("POST");
        connection.setRequestProperty("Authorization", "Basic " + encodedAuthorization);
        connection.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream());
        wr.write(data);
        wr.flush();
        InputStream in = connection.getInputStream();
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        StringBuffer sb = new StringBuffer();
        String line = "";
        while ((line = reader.readLine()) != null) {
            sb.append(line);
        }
        wr.close();
        reader.close();
        return sb.toString();
    }

}
var postParams = {
    title: 'Mr. VoiceBunny introduction',
    script: '{
            "Part001":"[make voice like you are giving a speech] Hello world.",
            "Part002":"I am mr. VoiceBunny",
            "Part003":"[with animosity] I have to go! Bye!"
        }',
    language: 'eng-us',
    genderAndAge: 'middleAgeMale',
    lifetime: 86400,
    remarks: 'I want a really friendly voice, in the Part002 please be enfatic.'
    syncedRecording: 1,
    ping: 'api@voicebunny.com',
    price: 50
};

var requestParams = querystring.stringify(postParams);
var voicebunnyUser = 'xxXXxx';
var voicebunnyToken = 'xxxxXXXXxxxxXXXX';
var options = {
    host: 'api.voicebunny.com',
    port: 443,
    path: 'projects/addBooking',
    method: 'POST',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Content-Length': requestParams.length,
        'Authorization': 'Basic ' + new Buffer(voicebunnyUser + ':' + voicebunnyToken).toString('base64')
    }
};

var req = https.request(options, function (res) {
    res.setEncoding('utf8');
    res.on('data', function (data) {
        console.log(data);
    });
});
req.write(requestParams);
req.end();
<?php
$voicebunnyUser = 'xxXXxx';
$voicebunnyToken = 'xxxxXXXXxxxxXXXX';
$url_api = 'https://api.voicebunny.com/projects/addBooking';
$postVars = array(
	'title' => 'Mr. VoiceBunny introduction',
	'language' => 'eng-us',
	'genderAndAge' => 'middleAgeMale',
	'script' => '{
            "Part001":"[make voice like you are giving a speech] Hello world.",
            "Part002":"I am mr. VoiceBunny",
            "Part003":"[with animosity] I have to go! Bye!"
        }',
	'lifetime' => 86400,
	'remarks': 'I want a really friendly voice, in the Part002 please be enfatic.',
	'syncedRecording': 1,
	'ping': 'api@voicebunny.com',
	'talentID': 1,
);
$vars = http_build_query($postVars);
$opts = array(
	CURLOPT_URL => $url_api,
	CURLOPT_RETURNTRANSFER => TRUE,
	CURLOPT_INFILESIZE => -1,
	CURLOPT_TIMEOUT => 60,
	CURLOPT_SSL_VERIFYPEER => false,
	CURLOPT_POST => TRUE,
	CURLOPT_POSTFIELDS => $vars,
	CURLOPT_USERPWD => $voicebunnyUser . ':' . $voicebunnyToken,
);
$curl = curl_init();
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
print_r($response);
?>
import requests
import simplejson
from requests.auth import HTTPBasicAuth

url = 'https://api.voicebunny.com'
api_id = 'XX'
api_key = "xxxxXXXXxxxxXXXX"
req = requests.post(url+'/projects/addBooking',
   data={
        'title': 'Mr. VoiceBunny introduction',
        'script': '{
            "Part001":"[make voice like you are giving a speech] Hello world.",
            "Part002":"I am mr. VoiceBunny",
            "Part003":"[with animosity] I have to go! Bye!"
        }',
        'language': 'eng-us',
        'genderAndAge': 'middleAgeMale',
        'lifetime': '86400',
        'remarks': "I want a really friendly voice, in the Part002 please be enfatic.",
	'syncedRecording': '1',
	'ping': "api@voicebunny.com",
	'talentID': '1'
   }, 
   auth=HTTPBasicAuth(api_id, api_key),verify=False)
data = simplejson.loads(req.text)
response = data['project']
require 'faraday'
require 'faraday_middleware'

@conn = nil
@api_id = "XX"
@api_key = "xxxxXXXXxxxxXXXX"
resp = nil

@conn = Faraday.new(:url =>("https://"+ @api_id+":"+@api_key +"@api.voicebunny.com"),:ssl => {:verify => false}) do |builder|
	builder.use Faraday::Request::Multipart
	builder.use Faraday::Request::UrlEncoded
	builder.use Faraday::Response::ParseJson
	builder.use Faraday::Adapter::NetHttp		  
end

resp = @conn.post '/projects/addBooking.json', {
	script: '{
            "Part001":"[make voice like you are giving a speech] Hello world.",
            "Part002":"I am mr. VoiceBunny",
            "Part003":"[with animosity] I have to go! Bye!"
        }',
	title: 'Mr. VoiceBunny introduction',
	language: 'eng-us',
	genderAndAge: 'middleAgeMale',
	lifetime: 86400,
	remarks: 'I want a really friendly voice, in the Part002 please be enfatic.',
	syncedRecording: 1,
	ping: 'api@voicebunny.com',
	talentID: 1
}

resp.body