### Install Resemble Python Library Source: https://docs.app.resemble.ai/docs/getting_started/quick_start Installs the Resemble Python library using pip. This is the first step to programmatically interact with the Resemble API. ```bash pip install resemble ``` -------------------------------- ### Authenticate and Create Sync Clip with Resemble API (Python) Source: https://docs.app.resemble.ai/docs/getting_started/quick_start Demonstrates how to authenticate with the Resemble API using an API key, retrieve project and voice UUIDs, and create a synchronized audio clip. It outputs the audio source URL. Requires the 'resemble' library to be installed. ```python from resemble import Resemble Resemble.api_key('YOUR_API_KEY') # Get your default Resemble project. project_uuid = Resemble.v2.projects.all(1, 10)['items'][0]['uuid'] # Get your Voice uuid. In this example, we'll obtain the first. voice_uuid = Resemble.v2.voices.all(1, 10)['items'][0]['uuid'] # Let's create a clip! body = 'This is a test' response = Resemble.v2.clips.create_sync(project_uuid, voice_uuid, body, title=None, sample_rate=None, output_format=None, precision=None, include_timestamps=None, is_archived=None, raw=None) print(clip['audio_src']) ``` -------------------------------- ### Billing Usage API Key Configuration Example Source: https://docs.app.resemble.ai/docs/management/resource_account/billing_usage This JSON object represents a configuration example, likely for setting up API access. It includes placeholders for your API token and streaming/direct synthesis endpoints. ```JSON { "logged_in": false, "api_key": "YOUR_API_TOKEN", "stream_synth_endpoint": "YOUR_STREAMING_ENDPOINT", "direct_synth_endpoint": "YOUR_SYNTH_ENDPOINT" } ``` -------------------------------- ### Get Identity List - cURL Example Source: https://docs.app.resemble.ai/docs/resource_detect/resource_identity/get An example demonstrating how to fetch a list of identities using cURL. It includes setting the Authorization header with an API key and optional query parameters for searching and pagination. ```curl curl --request GET \ --url 'https://app.resemble.ai/api/v2/identity?search=John&page=1' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-type: application/json' ``` -------------------------------- ### Example Configuration for Resemble AI API Source: https://docs.app.resemble.ai/docs/1.0.0/resource_clip/resource An example configuration object for interacting with the Resemble AI API. This object contains authentication details and endpoint URLs for streaming and direct synthesis. ```json { "logged_in": false, "api_key": "YOUR_API_TOKEN", "stream_synth_endpoint": "YOUR_STREAMING_ENDPOINT", "direct_synth_endpoint": "YOUR_SYNTH_ENDPOINT" } ``` -------------------------------- ### Get All Projects - cURL Example Source: https://docs.app.resemble.ai/docs/1.0.0/resource_project/get_all This snippet demonstrates how to retrieve all projects using the Resemble AI API via a cURL command. It requires an authorization token and specifies the endpoint for fetching project data. The expected output is a JSON array of project objects, each containing an ID, UUID, name, and description. ```shell curl "https://app.resemble.ai/api/v1/projects" \ -H "Authorization: Token token=YOUR_API_TOKEN" ``` -------------------------------- ### Project Resource Definition Example Source: https://docs.app.resemble.ai/docs/1.0.0/resource_project/create An example JSON structure representing the project resource that should be included in the request body when creating a new project. This defines the parameters for project creation, such as authentication details and endpoints. ```json {"logged_in":false,"api_key":"YOUR_API_TOKEN","stream_synth_endpoint":"YOUR_STREAMING_ENDPOINT","direct_synth_endpoint":"YOUR_SYNTH_ENDPOINT"} ``` -------------------------------- ### GET /api/v2/projects Source: https://docs.app.resemble.ai/docs/management/resource_project/all Retrieves a list of projects with pagination support. ```APIDOC ## GET /api/v2/projects ### Description This endpoint retrieves projects with support for pagination. ### Method GET ### Endpoint https://app.resemble.ai/api/v2/projects ### Parameters #### Query Parameters - **page** (number) - Optional - The page to fetch, starting from 1. - **page_size** (number) - Optional - Determines the number of items per page, between 10 and 1000 (inclusive). ### Request Example ```json { "page": 1, "page_size": 10 } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **page** (number) - The current page number. - **num_pages** (number) - The total number of pages available. - **page_size** (number) - The number of items per page. - **items** (Array) - An array of project objects. Each project object contains: - **uuid** (string) - The unique identifier for the project. - **name** (string) - The name of the project. - **description** (string) - A description of the project. - **is_collaborative** (boolean) - Indicates if the project is collaborative. - **is_archived** (boolean) - Indicates if the project is archived. - **created_at** (UTC Date) - The timestamp when the project was created. - **updated_at** (UTC Date) - The timestamp when the project was last updated. #### Response Example ```json { "success": true, "page": 1, "num_pages": 5, "page_size": 10, "items": [ { "uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "My First Project", "description": "This is a sample project.", "is_collaborative": false, "is_archived": false, "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Retrieve Clips using cURL Source: https://docs.app.resemble.ai/docs/1.0.0/resource_clip/get_all Example of how to fetch all clips from a Resemble AI project using the cURL command-line tool. It demonstrates the correct URL format, including placeholders for project UUID and page number, and shows how to include the authorization token in the request header. ```bash curl "https://app.resemble.ai/api/v1/projects//clips?page=" \ -H "Authorization: Token token=YOUR_API_TOKEN" ``` -------------------------------- ### SSML Say-as Tag Example Source: https://docs.app.resemble.ai/docs/1.0.0/ssml Illustrates the SSML say-as tag, which guides the speech synthesis AI on how to pronounce specific content. The 'interpret-as' attribute, such as 'characters', dictates the pronunciation method. ```xml This SSML stuff is really cool! ``` ```xml ``` -------------------------------- ### Get All Projects (NodeJS) Source: https://docs.app.resemble.ai/docs/management/resource_project/all This snippet demonstrates how to fetch all projects using the Resemble AI NodeJS SDK. It requires setting an API key and allows specifying the page number and page size for pagination. The response contains project details. ```javascript import { Resemble } from '@resemble/node' Resemble.setApiKey('YOUR_API_TOKEN') let page = 1 let pageSize = 10 const response = await Resemble.v2.projects.all(page, pageSize) const projects = response.items ``` -------------------------------- ### Resemble AI Configuration Example Source: https://docs.app.resemble.ai/docs/1.0.0/resource_voice/data_format An example JSON configuration object for Resemble AI, likely used for setting up API endpoints and authentication. It includes fields for login status, API key, and streaming/direct synthesis endpoints. ```json { "logged_in":false, "api_key":"YOUR_API_TOKEN", "stream_synth_endpoint":"YOUR_STREAMING_ENDPOINT", "direct_synth_endpoint":"YOUR_SYNTH_ENDPOINT" } ``` -------------------------------- ### Resemble AI API v1.0.0 - Introduction Source: https://docs.app.resemble.ai/docs/1.0.0/introduction This section provides general information about the Resemble AI API v1.0.0, including its purpose, design principles, and contact information. It also includes a configuration example. ```APIDOC ## Resemble AI API v1.0.0 ### Description Welcome to Resemble's API! The API provides programmatic use for all Resemble functionality, including creating voices, clips, and projects. Some resources and endpoints have restricted usage. Our API has predictable resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. ### Contact If at any time, you find the current documentation confusing, please feel to reach out to us at support@resemble.ai. ### Configuration Example ```json { "logged_in": false, "api_key": "YOUR_API_TOKEN", "stream_synth_endpoint": "YOUR_STREAMING_ENDPOINT", "direct_synth_endpoint": "YOUR_SYNTH_ENDPOINT" } ``` ``` -------------------------------- ### Create Voice with NodeJS SDK Source: https://docs.app.resemble.ai/docs/create_voices/resource_voice/create This example demonstrates how to use the Resemble Node.js SDK to create a new voice. It requires setting your API key and providing details such as the voice name, dataset URL, and callback URI. ```javascript import { Resemble } from '@resemble/node' Resemble.setApiKey('YOUR_API_TOKEN') await Resemble.v2.voices.create({ name: "Chef", dataset_url: "https://../dataset.zip", callback_uri: "http://example.com/cb", language: "en-US" }) ``` -------------------------------- ### Get Specific Project via Python Source: https://docs.app.resemble.ai/docs/1.0.0/resource_project/get_one Illustrates fetching a project resource using the Python requests library. This code snippet requires the 'requests' library to be installed and necessitates replacing placeholders for project UUID and API token. ```python import requests url = "https://app.resemble.ai/api/v1/projects/" headers = { 'Authorization': 'Token token=YOUR_API_TOKEN', 'Content-Type': 'application/json' } response = requests.get(url, headers=headers) ``` -------------------------------- ### Get Billing Usage API Request Source: https://docs.app.resemble.ai/docs/management/resource_account/billing_usage This snippet shows the HTTP GET request to retrieve billing usage data from the Resemble AI API. It requires an API key and optionally accepts start and end dates for filtering usage. ```HTTP GET https://app.resemble.ai/api/v2/account/billing_usage?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD ``` -------------------------------- ### Get Project Details (NodeJS) Source: https://docs.app.resemble.ai/docs/management/resource_project/one This NodeJS snippet demonstrates how to fetch project details using the Resemble AI SDK. It requires setting your API key and provides the project UUID as input. The output is a JSON object containing project metadata. ```javascript import { Resemble } from '@resemble/node' Resemble.setApiKey('YOUR_API_TOKEN') await Resemble.v2.projects.get(projectUuid) ``` -------------------------------- ### HTTP Response for Project Creation Source: https://docs.app.resemble.ai/docs/1.0.0/resource_project/create This is an example of the expected HTTP response when a new project is successfully created via the Resemble AI API. It indicates a status of 'OK' and provides a unique 'uuid' for the newly created project. ```json { "status": "OK", "uuid": "123aeb" } ``` -------------------------------- ### Create Voice - Step 1: Get Signed URL (Python) Source: https://docs.app.resemble.ai/docs/1.0.0/resource_voice/create Initiates the voice creation process by requesting a signed URL from the Resemble AI API using Python. Calculates the MD5 checksum of the audio file. Requires filename, byte size, MD5 checksum, and voice name. ```Python import requests import hashlib import os def md5(fname): hash_md5 = hashlib.md5() with open(fname, "rb") as f: for chunk in iter(lambda: f.read(4096), b""): hash_md5.update(chunk) return hash_md5.hexdigest() url = "https://app.resemble.ai/api/v1/voices" headers = { 'Authorization': 'Token token=YOUR_API_TOKEN', 'Content-Type': 'application/json' } filename = "YOURFILE.wav" data = { "filename": filename, "byte_size": os.path.getsize(filename), "checksum": md5(filename), "content-type": "audio/x-wav", "name": "" } response = requests.post(url, headers=headers, json=data) ``` -------------------------------- ### NodeJS Authentication Setup Source: https://docs.app.resemble.ai/docs/getting_started/authentication This snippet demonstrates how to set up authentication for the Resemble AI API in a NodeJS environment. It requires the '@resemble/node' package and your API token. The output is a JSON object containing authentication details and endpoints. ```javascript import { Resemble } from '@resemble/node' Resemble.setApiKey('YOUR_API_TOKEN') ``` ```json { "logged_in":false, "api_key":"YOUR_API_TOKEN", "stream_synth_endpoint":"YOUR_STREAMING_ENDPOINT", "direct_synth_endpoint":"YOUR_SYNTH_ENDPOINT" } ``` -------------------------------- ### Get All Clips via HTTP Request Source: https://docs.app.resemble.ai/docs/1.0.0/resource_clip/get_all This section details the HTTP GET request to retrieve all clips for a given project. It requires the project's UUID and a page number for pagination. The response includes metadata about the current page, total pages, and a list of clip objects, each containing details like title, audio link, and timestamps. ```http GET https://app.resemble.ai/api/v1/projects//clips?page= ``` -------------------------------- ### API Configuration Source: https://docs.app.resemble.ai/docs/1.0.0/errors Example of a configuration object that might be used to interact with the Resemble AI API, including authentication and endpoint details. ```APIDOC ## API Configuration Example This is an example of a configuration object that might be returned or used when interacting with the Resemble API. ### Request Body Example ```json { "logged_in": false, "api_key": "YOUR_API_TOKEN", "stream_synth_endpoint": "YOUR_STREAMING_ENDPOINT", "direct_synth_endpoint": "YOUR_SYNTH_ENDPOINT" } ``` ``` -------------------------------- ### GET /api/v1/projects Source: https://docs.app.resemble.ai/docs/1.0.0/resource_project/get_all Retrieves a list of all projects associated with the Resemble AI account. This endpoint is useful for getting an overview of all available projects. ```APIDOC ## GET /api/v1/projects ### Description This endpoint retrieves all projects. ### Method GET ### Endpoint `https://app.resemble.ai/api/v1/projects` ### Parameters #### Query Parameters None #### Request Body None ### Request Example #### cURL ```bash curl "https://app.resemble.ai/api/v1/projects" \ -H "Authorization: Token token=YOUR_API_TOKEN" ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the project. - **uuid** (string) - The universally unique identifier for the project. - **name** (string) - The name of the project. - **description** (string) - A brief description of the project. #### Response Example ```json [ { "id": 1, "uuid": "1ab233", "name": "Resemble", "description": "Thoughts by Resemble" }, { "id": 2, "uuid": "1ab234", "name": "Dose of Health", "description": "Health-focused podcast from around the internets." } ] ``` ``` -------------------------------- ### GET /api/v2/projects/{project_uuid} Source: https://docs.app.resemble.ai/docs/management/resource_project/one Retrieves the details of a specific project identified by its UUID. ```APIDOC ## GET /api/v2/projects/{project_uuid} ### Description This endpoint retrieves a project's details using its unique identifier. ### Method GET ### Endpoint `/api/v2/projects/` ### Parameters #### Path Parameters - **project_uuid** (string) - Required - UUID of the project to fetch ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **item** (object) - Contains the project details. - **uuid** (string) - The unique identifier of the project. - **name** (string) - The name of the project. - **description** (string) - A description of the project. - **is_collaborative** (boolean) - Flag indicating if the project is collaborative. - **is_archived** (boolean) - Flag indicating if the project is archived. - **created_at** (UTC Date) - The timestamp when the project was created. - **updated_at** (UTC Date) - The timestamp when the project was last updated. ### Response Example ```json { "success": true, "item": { "uuid": "", "name": "", "description": "", "is_collaborative": , "is_archived": , "created_at": "", "updated_at": "" } } ``` ``` -------------------------------- ### Get Account Teams - HTTP Response Example Source: https://docs.app.resemble.ai/docs/management/resource_account/teams Example of a successful HTTP response when retrieving account teams. The 'items' array contains objects, each representing a team with its specific attributes like 'uuid', 'name', 'plan', and usage metrics. ```JSON { "success": true, "items": [ { "uuid": "", "name": "", "plan": "", "voice_limit": , "units": "", "rate": , "current_usage": } ] } ``` -------------------------------- ### Get All Voices via Python Source: https://docs.app.resemble.ai/docs/1.0.0/resource_voice/get_all Fetches all voices from the Resemble AI API using the Python requests library. This script sends a GET request with the necessary authorization header. The response is expected to be a JSON object, although the provided example output is a JSON array. ```python import requests url = "https://app.resemble.ai/api/v1/voices" headers = { 'Authorization': 'Token token=YOUR_API_TOKEN', 'Content-Type': 'application/json' } response = requests.get(url, headers=headers) ``` -------------------------------- ### Example HTTP Response Structure Source: https://docs.app.resemble.ai/docs/audio_edit/one This JSON structure represents a successful response when fetching an audio edit. It contains a success flag and an 'item' object with details such as UUIDs, transcripts, and audio URLs. ```JSON { "success": true, "item": { "uuid": , "voice_uuid": , "original_transcript": , "target_transcript": , "input_audio_url": , "result_audio_url": } } ``` -------------------------------- ### SSML Prosody Tag Example Source: https://docs.app.resemble.ai/docs/getting_started/ssml The tag allows control over the pitch, rate, and volume of synthesized speech. This example demonstrates variations in pitch, speaking rate, and volume. ```xml This part is normal. This part is going to sound high pitched. This part is going to be spoken fast. And this part is loud! ``` -------------------------------- ### Create Voice - Step 1: Get Signed URL Source: https://docs.app.resemble.ai/docs/1.0.0/resource_voice/create Initiates the voice creation process by requesting a signed URL for uploading audio data. This step requires the voice name, filename, byte size, and MD5 checksum of the audio file. ```APIDOC ## POST /api/v1/voices ### Description Retrieves a signed URL to upload an audio file for voice creation. Requires voice name, filename, byte size, and MD5 checksum. ### Method POST ### Endpoint https://app.resemble.ai/api/v1/voices ### Parameters #### Request Body - **name** (string) - Required - The name of the voice. - **filename** (string) - Required - The name of the audio file. - **byte_size** (integer) - Required - The size of the audio file in bytes. - **checksum** (string) - Required - The MD5 checksum of the audio file. - **content-type** (string) - Optional - The content type of the file (default: `audio/x-wav`). Valid options: `audio/x-wav`, `application/gzip`, `application/tar`, `application/x-tar`. - **callback_uri** (string) - Optional - A URI to receive a POST request when the voice is ready. ### Request Example ```json { "filename": "YOURFILE.wav", "byte_size": 78183182, "checksum": "ce1231231231231231", "content_type": "audio/x-wav", "name": "" } ``` ### Response #### Success Response (200) - **url** (string) - The signed URL for uploading the audio file. - **headers** (object) - Headers to be used in the subsequent PUT request. - **Content-Type** (string) - The content type of the audio file. - **Content-MD5** (string) - The MD5 checksum of the audio file. - **voice** (string) - The unique identifier (UUID) for the voice being created. #### Response Example ```json { "url": "Signed URL", "headers": { "Content-Type": "audio/x-wav", "Content-MD5": "FILE_MD5" }, "voice": "Voice UUID" } ``` ``` -------------------------------- ### Create Voice - Step 1: Get Signed URL (cURL) Source: https://docs.app.resemble.ai/docs/1.0.0/resource_voice/create Initiates the voice creation process by requesting a signed URL from the Resemble AI API. Requires filename, byte size, MD5 checksum, and voice name. Accepts audio/x-wav and other formats. A callback URI can also be provided. ```cURL curl --request POST 'https://app.resemble.ai/api/v1/voices' \ -H 'Authorization: Token token=YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ --data-raw '{ \ "filename": "YOURFILE.wav", \ "byte_size": 78183182, \ "checksum": "ce1231231231231231", \ "content_type": "audio/x-wav", \ "name": "" \ }' ``` -------------------------------- ### GET /api/v2/account/billing_usage Source: https://docs.app.resemble.ai/docs/management/resource_account/billing_usage Retrieves the synthesis and detection usage for the account. The values returned by the API are in seconds. ```APIDOC ## GET /api/v2/account/billing_usage ### Description This endpoint retrieves the synthesis and detection usage for the account. The values returned by the API are in seconds. ### Method GET ### Endpoint https://app.resemble.ai/api/v2/account/billing_usage ### Parameters #### Query Parameters - **start_date** (string) - Optional - Start date in YYYY-MM-DD format - **end_date** (string) - Optional - End date in YYYY-MM-DD format ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **items** (object) - Contains the usage data. - **detect** (number) - Synthesis usage in seconds. - **synth** (number) - Detection usage in seconds. #### Response Example ```json { "success": true, "items": { "detect": 12345, "synth": 67890 } } ``` ``` -------------------------------- ### GET /api/v2/projects//clips Source: https://docs.app.resemble.ai/docs/management/resource_clip/all Retrieves a paginated list of clips associated with a specific project. Supports filtering by page number, page size, and a search query. ```APIDOC ## GET /api/v2/projects//clips ### Description This endpoint retrieves clips in a project. You can specify pagination parameters and a search query. ### Method GET ### Endpoint `https://app.resemble.ai/api/v2/projects//clips` ### Parameters #### Path Parameters - **project_uuid** (string) - Required - Clips for the project with this UUID will be returned #### Query Parameters - **page** (number) - Optional - The page to fetch, starting from 1 - **page_size** (number) - Optional - Determines the number of items per page, between 10-1000 (inclusive) - **q** (string) - Optional - Searches for clips with a title matching the value ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **page** (number) - The current page number. - **num_pages** (number) - The total number of pages available. - **page_size** (number) - The number of items per page. - **items** (Array) - An array of clip objects. - **uuid** (string) - The unique identifier for the clip. - **title** (string) - The title of the clip. - **body** (string) - The content of the clip. - **voice_uuid** (string) - The UUID of the voice used for the clip. Can be a comma-separated list if multiple voices are present. - **is_archived** (boolean) - Indicates if the clip is archived. - **timestamps** (object) - Timing information for the clip's audio. - **graph_chars** (string[]) - Character timestamps. - **graph_times** (float[][]) - Graph time data. - **phon_chars** (string[]) - Phoneme character timestamps. - **phon_times** (float[][]) - Phoneme time data. - **audio_src** (string) - The source URL for the clip's audio. - **created_at** (UTC Date) - The timestamp when the clip was created. - **updated_at** (UTC Date) - The timestamp when the clip was last updated. #### Response Example ```json { "success": true, "page": 1, "num_pages": 5, "page_size": 10, "items": [ { "uuid": "clip_uuid_1", "title": "Introduction", "body": "Hello, welcome to the demo.", "voice_uuid": "voice_uuid_1", "is_archived": false, "timestamps": { "graph_chars": ["H","e","l","l","o"], "graph_times": [[0.1, 0.2], [0.2, 0.3], [0.3, 0.4], [0.4, 0.5], [0.5, 0.6]], "phon_chars": ["h","ɛ","l","o"], "phon_times": [[0.1, 0.2], [0.2, 0.3], [0.3, 0.4], [0.4, 0.5]] }, "audio_src": "https://app.resemble.ai/audio/clip_uuid_1.mp3", "created_at": "2023-01-01T10:00:00Z", "updated_at": "2023-01-01T10:05:00Z" } ] } ``` ``` -------------------------------- ### Create Project via NodeJS - Resemble AI API Source: https://docs.app.resemble.ai/docs/management/resource_project/create This code snippet demonstrates how to create a new project using the Resemble AI API with the NodeJS SDK. It requires setting your API key and then calling the `create` method with project details like name, description, and collaboration settings. Ensure you have the `@resemble/node` package installed. ```javascript import { Resemble } from '@resemble/node' Resemble.setApiKey('YOUR_API_TOKEN') await Resemble.v2.projects.create({ name: "Cooking Podcast", description: "Clips generated for our Thursday night cooking podcast", is_collaborative: true, is_archived: false }) ``` -------------------------------- ### GET /api/v2/term_substitutions Source: https://docs.app.resemble.ai/docs/management/resource_term_substitutions/all Retrieves a paginated list of all term substitutions. You can control the page number and the number of items per page. ```APIDOC ## GET /api/v2/term_substitutions ### Description This endpoint retrieves term substitutions. It allows for pagination to manage large result sets. ### Method GET ### Endpoint https://app.resemble.ai/api/v2/term_substitutions ### Parameters #### Query Parameters - **page** (number) - Required - The page to fetch, starting from 1. - **page_size** (number) - Optional - Determines the number of items per page. Must be between 10 and 1000 (inclusive). ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **page** (number) - The current page number. - **num_pages** (number) - The total number of pages available. - **page_size** (number) - The number of items per page. - **items** (Array) - An array of term substitution objects, where each object contains: - **uuid** (string) - Unique identifier for the substitution. - **original_text** (string) - The original text to be replaced. - **replacement_text** (string) - The text to replace the original text with. - **created_at** (UTC Date) - The timestamp when the substitution was created. - **updated_at** (UTC Date) - The timestamp when the substitution was last updated. #### Response Example ```json { "success": true, "page": 1, "num_pages": 5, "page_size": 10, "items": [ { "uuid": "some-uuid-1", "original_text": "hello", "replacement_text": "hi", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" }, { "uuid": "some-uuid-2", "original_text": "world", "replacement_text": "earth", "created_at": "2023-10-27T10:05:00Z", "updated_at": "2023-10-27T10:05:00Z" } ] } ``` ``` -------------------------------- ### GET /api/v1/projects//clips Source: https://docs.app.resemble.ai/docs/1.0.0/resource_clip/get_all Retrieves all clips within a specified project. This endpoint is paginated and requires a 'page' query parameter. ```APIDOC ## GET /api/v1/projects//clips ### Description This endpoint retrieves all clips within the given project. It is paginated, so it requires a `page` query parameter. ### Method GET ### Endpoint `https://app.resemble.ai/api/v1/projects//clips?page=` ### Parameters #### Path Parameters - **project_uuid** (string) - Required - The uuid of the project to fetch #### Query Parameters - **page** (integer) - Required - The page to fetch ### Response #### Success Response (200) - **current_page** (integer) - The current page number. - **page_count** (integer) - The total number of pages. - **pods** (array) - An array of clip objects. - **uuid** (string) - The unique identifier for the clip. - **project_id** (integer) - The ID of the project the clip belongs to. - **title** (string) - The title of the clip. - **body** (string) - The spoken content of the clip in SSML format. - **updated_at** (string) - The timestamp when the clip was last updated. - **created_at** (string) - The timestamp when the clip was created. - **finished** (boolean) - Indicates if the clip generation is finished. - **link** (string) - A URL to the audio file of the clip. - **voice** (string) - The identifier of the voice used for the clip. - **phoneme_timestamps** (object) - Contains phoneme timing information. - **phonemes** (string) - The sequence of phonemes. - **end_times** (array of floats) - The end times for each phoneme. - **phoneme_chars** (array of strings) - The characters representing each phoneme. #### Response Example ```json { "current_page": 0, "page_count": 0, "pods": [ { "uuid": "7ff0ffa", "project_id": 1, "title": "test clip 2", "body": "

this is a test

", "updated_at": "2018-09-03T03:33:33.000Z", "created_at": "2018-09-03T03:33:33.000Z", "finished": true, "link": "https://s3.resemble.ai/audio.wav", "voice": "7000abc", "phoneme_timestamps": { "phonemes": "^ðɪs ɪz ɐ tɛst.~", "end_times": [0.05, 0.062, 0.137, 0.249, 0.324, 0.387, 0.449, 0.511, 0.561, 0.624, 0.673, 0.773, 0.935, 1.035, 1.122, 1.21], "phoneme_chars": ["^", "ð", "ɪ", "s", " ", "ɪ", "z", " ", "ɐ", " ", "t", "ɛ", "s", "t", ".", "~"] } } ] } ``` ### Examples #### cURL ```bash curl "https://app.resemble.ai/api/v1/projects//clips?page=" \ -H "Authorization: Token token=YOUR_API_TOKEN" ``` #### Python ```python import requests url = "https://app.resemble.ai/api/v1/projects//clips?page=" headers = { 'Authorization': 'Token token=YOUR_API_TOKEN', 'Content-Type': 'application/json' } response = requests.get(url, headers=headers) ``` ``` -------------------------------- ### GET /api/v2/voices//recordings Source: https://docs.app.resemble.ai/docs/create_voices/resource_recording/all Retrieves a list of recordings for a specific voice, with options for pagination. ```APIDOC ## GET /api/v2/voices//recordings ### Description This endpoint retrieves recordings for a particular voice. ### Method GET ### Endpoint `/api/v2/voices//recordings` ### Parameters #### Path Parameters - **voice_uuid** (string) - Required - Recordings for the voice with this UUID will be returned #### Query Parameters - **page** (number) - Optional - The page to fetch (starting from 1) - **page_size** (number) - Optional - Determines the number of items per page (between 10-1000 inclusive) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **page** (number) - The current page number. - **num_pages** (number) - The total number of available pages. - **page_size** (number) - The number of items per page. - **items** (Array) - An array of recording objects. - **uuid** (string) - The unique identifier for the recording. - **name** (string) - The name of the recording. - **text** (string) - The text content associated with the recording. - **emotion** (string) - The emotion detected or assigned to the recording. - **is_active** (boolean) - Indicates if the recording is active. - **fill** (boolean) - Indicates if the recording is a fill. - **audio_src** (string) - Optional - The source URL for the audio file. - **created_at** (string) - The timestamp when the recording was created (UTC). - **updated_at** (string) - The timestamp when the recording was last updated (UTC). - **metrics** (object) - Optional - Performance metrics for the recording. - **signal_to_noise_ratio** (number) - **loudness_grade** (string) - **resemble_sample_score** (number) #### Response Example ```json { "success": true, "page": 1, "num_pages": 5, "page_size": 10, "items": [ { "uuid": "recording_uuid_1", "name": "My First Recording", "text": "Hello, this is a test.", "emotion": "neutral", "is_active": true, "fill": false, "audio_src": "https://app.resemble.ai/audio/recording_uuid_1.mp3", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:05:00Z", "metrics": { "signal_to_noise_ratio": 25.5, "loudness_grade": "good", "resemble_sample_score": 0.9 } } ] } ``` ``` -------------------------------- ### Make GET Request to Retrieve Audio Edits Source: https://docs.app.resemble.ai/docs/audio_edit/all This snippet demonstrates how to make an HTTP GET request to the Resemble AI API to fetch a list of audio edits. The 'page' query parameter can be used to paginate through the results. The response includes pagination information and an array of audio edit items. ```HTTP GET https://app.resemble.ai/api/v2/edit?page=1 ``` -------------------------------- ### POST /api/v2/voices Source: https://docs.app.resemble.ai/docs/create_voices/resource_voice/create This endpoint creates a voice and optionally starts training. It supports both Rapid Voice Clone and Professional Voice Clone, allowing for voice creation via a dataset URL or by uploading individual recordings. ```APIDOC ## POST /api/v2/voices ### Description This endpoint creates a voice and optionally starts training. It supports both Rapid Voice Clone and Professional Voice Clone, allowing for voice creation via a dataset URL or by uploading individual recordings. The Create voice API is only available for Business plan users. ### Method POST ### Endpoint https://app.resemble.ai/api/v2/voices ### Parameters #### Request Body - **name** (string) - Required - Name of the voice - **voice_type** (string) - Optional - The type of voice to create. Either `rapid` or `professional`. If not provided defaults to `professional` - **dataset_url** (string) - Optional - A URL to a dataset on which to train the voice on. Please see here for acceptable dataset formats - **callback_uri** (string) - Optional - A URL (webhook) that will be notified upon voice training completion. Please see here for callback details - **language** (string) - Optional - The default language for the voice. Must be one of: `ar`, `da`, `de`, `el`, `en-US`, `es`, `fi`, `fr-FR`, `he`, `hi`, `it`, `ja`, `ko`, `ms`, `nl`, `no`, `pl`, `pt`, `ru`, `sv`, `sw`, `tr`, `zh`. If not provided defaults to `en-US` ### Request Example ```json { "name": "My New Voice", "voice_type": "rapid", "dataset_url": "https://example.com/dataset.wav" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **item** (object) - Contains details of the created voice. - **uuid** (string) - The unique identifier for the voice. - **name** (string) - The name of the voice. - **status** (string) - The current status of the voice (e.g., 'created', 'training'). - **dataset_url** (string) - The URL of the dataset used for training. - **default_language** (string) - The default language of the voice. - **created_at** (UTC Date) - The timestamp when the voice was created. - **updated_at** (UTC Date) - The timestamp when the voice was last updated. #### Response Example ```json { "success": true, "item": { "uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "My New Voice", "status": "created", "dataset_url": "https://example.com/dataset.wav", "default_language": "en-US", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" } } ``` ### Callback If `callback_uri` is provided, a POST request will be sent upon training completion. #### Training Completion Callback ```json { "ok": true, "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "status": "finished", "recordings": [], "issue": null } ``` ``` -------------------------------- ### Get Specific Project via cURL Source: https://docs.app.resemble.ai/docs/1.0.0/resource_project/get_one Demonstrates how to retrieve a specific project resource using a cURL command. Requires replacing placeholders for project UUID and API token. ```shell curl "https://app.resemble.ai/api/v1/projects/" \ -H "Authorization: Token token=YOUR_API_TOKEN" ``` -------------------------------- ### Example Response for Voice Candidates Source: https://docs.app.resemble.ai/docs/resource_voice_design/create This is an example JSON response from the Resemble AI API's voice generation endpoint. It shows the structure of the 'voice_candidates' array, where each object contains an 'audio_url', 'voice_sample_index', and 'uuid' for a generated voice candidate. ```json { "voice_candidates": [ { "audio_url": "", "voice_sample_index": 0, "uuid": "" }, { "audio_url": "", "voice_sample_index": 1, "uuid": "" }, { "audio_url": "", "voice_sample_index": 2, "uuid": "" } ] } ``` -------------------------------- ### Speech to Speech Synthesis (curl) Source: https://docs.app.resemble.ai/docs/speech_to_speech Example of using curl to make a POST request to the low latency synthesis endpoint. This demonstrates setting up the request with necessary headers and a JSON payload containing voice, data, sample rate, and output format. ```bash curl --request POST 'https://f.cluster.resemble.ai/synthesize' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Accept-Encoding: gzip' \ --data '{ \ "voice_uuid": "55592656", \ "data": "", \ "sample_rate": 48000, \ "output_format": "wav" \ }' ``` -------------------------------- ### Retrieve Recording Details (NodeJS) Source: https://docs.app.resemble.ai/docs/create_voices/resource_recording/one This snippet demonstrates how to fetch a specific recording using the Resemble AI Node.js SDK. It requires the API key, voice UUID, and recording UUID as input. The output is the recording object if successful. ```javascript import { Resemble } from '@resemble/node' Resemble.setApiKey('YOUR_API_TOKEN') await Resemble.v2.recordings.get(voiceUuid, recordingUuid) ``` -------------------------------- ### GET /api/v2/voices/{voice_uuid}/recordings/{recording_uuid} Source: https://docs.app.resemble.ai/docs/create_voices/resource_recording/one Retrieves a specific recording for a given voice using its UUIDs. This endpoint provides metadata about the recording and a URL to the audio file if available. ```APIDOC ## GET /api/v2/voices/{voice_uuid}/recordings/{recording_uuid} ### Description Retrieves one recording for a particular voice. ### Method GET ### Endpoint `/api/v2/voices//recordings/` ### Parameters #### Path Parameters - **voice_uuid** (string) - Required - UUID of the voice to which the recording belongs - **recording_uuid** (string) - Required - UUID of the recording to fetch ### Request Example ```json { "logged_in": false, "api_key": "YOUR_API_TOKEN", "stream_synth_endpoint": "YOUR_STREAMING_ENDPOINT", "direct_synth_endpoint": "YOUR_SYNTH_ENDPOINT" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **item** (object) - Contains the details of the recording. - **uuid** (string) - The unique identifier for the recording. - **name** (string) - The name of the recording. - **text** (string) - The text that was synthesized for this recording. - **emotion** (string) - The emotion associated with the recording. - **is_active** (boolean) - Whether the recording is active. - **fill** (boolean) - Indicates if the recording is a filler word. - **audio_src** (string, Optional) - The URL to the audio file of the recording. - **created_at** (string) - The UTC timestamp when the recording was created. - **updated_at** (string) - The UTC timestamp when the recording was last updated. - **metrics** (object, Optional) - Performance metrics for the recording. - **signal_to_noise_ratio** (number) - The signal-to-noise ratio of the audio. - **loudness_grade** (string) - The loudness grade of the audio. - **resemble_sample_score** (number) - A sample score from Resemble. #### Response Example ```json { "success": true, "item": { "uuid": "", "name": "", "text": "", "emotion": "", "is_active": true, "fill": false, "audio_src": "Optional", "created_at": "UTC string", "updated_at": "UTC string", "metrics": { "signal_to_noise_ratio": , "loudness_grade": , "resemble_sample_score": } } } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.