--- title: Chatty Vader emoji: 💣 colorFrom: indigo colorTo: yellow sdk: gradio sdk_version: 3.43.2 app_file: app.py pinned: false --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference ## Cloning a voice with Coqui AI 1. Create an account on Coqui and get an api key from [account settings](https://app.coqui.ai/account). 2. [Clone a voice](https://docs.coqui.ai/reference/voices_clone_from_file_create) using a recording of length between 3 and 5 seconds. I used a `.wav` file. 3. [Create a sample of the cloned voice]() ## Creating a voice with [Resemble.ai](https://www.resemble.ai/) ### [API Reference for creating a voice](https://docs.app.resemble.ai/docs/resource_voice/create) 1. Get your Resemble API key after creating an account with [Resemble.ai](https://www.resemble.ai/). 2. Make a request to the endpoint with the `Authorization` header set to `Token ` and a JSON body with `name` and the `dataset_url`: ``` { "name": "chatty_vader", "dataset_url": "https://huggingface.co/spaces/aar2dee2/chatty_vader/resolve/main/data.zip" } ``` This will return a response like below. ``` { "success": true, "item": { "uuid": "10f91c43", "name": "chatty_vader", "status": "initializing", "dataset_url": "https://huggingface.co/spaces/aar2dee2/chatty_vader/resolve/main/data.zip", "created_at": "2023-04-07T06:38:29.307Z", "updated_at": "2023-04-07T06:38:29.323Z" } } ``` If you specify a `callback_url`, you get a notification from Resemble when the voice has been created. I temporarily modified the `app.py` so I could provide my huggingface space url as the `callback_url` in the `create a voice` request. ``` def receive_data_from_resemble(data): print("data from resemble", data) return data iface = gr.Interface(fn=receive_data_from_resemble, inputs="json", outputs="json") iface.launch() ``` Test creating a clip [api endpoint](https://app.resemble.ai/api/v2/projects/e2da3585/clips) json body; ```json { "title": "testing_vader", "body": "There is no need to panic. It will all be over soon", "voice_uuid": "f00d917f", "is_public": true, "callback_uri": "https://aar2dee2-chatty-vader.hf.space/run/predict" } ``` response received: ``` { "success": false, "message": "This voice is still building and cannot be used at this time." } ``` Same for voice id "10f91c43"