chatty_vader / README.md
aar2dee2
readme
1dce6f4
|
raw
history blame
2.1 kB
---
title: Chatty Vader
emoji: 💣
colorFrom: indigo
colorTo: yellow
sdk: gradio
sdk_version: 3.24.1
app_file: app.py
pinned: false
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
## 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 <your_resemble_api_key>` 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"