Methods

Objects

Media

Upload files, or use Text-to-Speech

Summary

    API init

    require 'vendor/autoload.php'; // Composer
    
    $api = new \CALLR\API\Client;
    $api->setAuth(new \CALLR\API\Authentication\LoginPasswordAuth('login', 'password'));
    
    var callr = require('callr');
    var api = new callr.api(callr.loginPasswordAuth('login', 'password'));
    
    require 'callr'
    api = CALLR::Api.new('login', 'password')
    
    import callr
    api = callr.Api("login", "password")
    
            

    List your medias

    $result = $api->call('media/library.get_list', [null]);
    
    api.call('media/library.get_list', null).success(function(result) {
        //
    });
    
    result = api.call('media/library.get_list', nil)
    result = api.call('media/library.get_list', None)
            

    Create an empty media

    $result = $api->call('media/library.create', ['name']);
    
    api.call('media/library.create', 'name').success(function(media_id) {
        //
    });
    
    result = api.call('media/library.create', 'name')
    result = api.call('media/library.create', 'name')
            

    Upload a media

    $media_id = 0;
    
    $result = $api->call('media/library.set_content', [$media_id, 'text', 'base64_audio_data']);
    
    var media_id = 0;
    
    api.call('media/library.set_content', media_id, 'text', 'base64_audio_data').success(function(result) {
        //
    });
    
    media_id = 0
    
    result = api.call('media/library.set_content', media_id, 'text', 'base64_audio_data')
    media_id = 0
    
    result = api.call('media/library.set_content', media_id, 'text', 'base64_audio_data')
            

    Use Text-to-Speech

    $media_id = 0;
    
    $result = $api->call('media/tts.set_content', [$media_id, 'Hello world!', 'TTS_EN-GB_SERENA', null]);
    
    var media_id = 0;
    
    api.call('media/tts.set_content', media_id, 'Hello world!', 'TTS_EN-GB_SERENA', null).success(function(result) {
        //
    });
    
    media_id = 0
    
    result = api.call('media/tts.set_content', media_id, 'Hello world!', 'TTS_EN-GB_SERENA', nil)
    media_id = 0
    
    result = api.call('media/tts.set_content', media_id, 'Hello world!', 'TTS_EN-GB_SERENA', None)