Spaces:
Runtime error
Runtime error
aar2dee2
commited on
Commit
·
1dce6f4
1
Parent(s):
22898c6
readme
Browse files
README.md
CHANGED
@@ -10,3 +10,73 @@ pinned: false
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
+
|
14 |
+
## Creating a voice with [Resemble.ai](https://www.resemble.ai/)
|
15 |
+
|
16 |
+
### [API Reference for creating a voice](https://docs.app.resemble.ai/docs/resource_voice/create)
|
17 |
+
|
18 |
+
1. Get your Resemble API key after creating an account with [Resemble.ai](https://www.resemble.ai/).
|
19 |
+
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`:
|
20 |
+
|
21 |
+
```
|
22 |
+
{
|
23 |
+
"name": "chatty_vader",
|
24 |
+
"dataset_url": "https://huggingface.co/spaces/aar2dee2/chatty_vader/resolve/main/data.zip"
|
25 |
+
}
|
26 |
+
```
|
27 |
+
|
28 |
+
This will return a response like below.
|
29 |
+
|
30 |
+
```
|
31 |
+
{
|
32 |
+
"success": true,
|
33 |
+
"item": {
|
34 |
+
"uuid": "10f91c43",
|
35 |
+
"name": "chatty_vader",
|
36 |
+
"status": "initializing",
|
37 |
+
"dataset_url": "https://huggingface.co/spaces/aar2dee2/chatty_vader/resolve/main/data.zip",
|
38 |
+
"created_at": "2023-04-07T06:38:29.307Z",
|
39 |
+
"updated_at": "2023-04-07T06:38:29.323Z"
|
40 |
+
}
|
41 |
+
}
|
42 |
+
```
|
43 |
+
|
44 |
+
If you specify a `callback_url`, you get a notification from Resemble when the voice has been created.
|
45 |
+
|
46 |
+
I temporarily modified the `app.py` so I could provide my huggingface space url as the `callback_url` in the `create a voice` request.
|
47 |
+
|
48 |
+
```
|
49 |
+
def receive_data_from_resemble(data):
|
50 |
+
print("data from resemble", data)
|
51 |
+
return data
|
52 |
+
|
53 |
+
|
54 |
+
iface = gr.Interface(fn=receive_data_from_resemble,
|
55 |
+
inputs="json", outputs="json")
|
56 |
+
iface.launch()
|
57 |
+
```
|
58 |
+
|
59 |
+
Test creating a clip
|
60 |
+
[api endpoint](https://app.resemble.ai/api/v2/projects/e2da3585/clips)
|
61 |
+
json body;
|
62 |
+
|
63 |
+
```json
|
64 |
+
{
|
65 |
+
"title": "testing_vader",
|
66 |
+
"body": "There is no need to panic. It will all be over soon",
|
67 |
+
"voice_uuid": "f00d917f",
|
68 |
+
"is_public": true,
|
69 |
+
"callback_uri": "https://aar2dee2-chatty-vader.hf.space/run/predict"
|
70 |
+
}
|
71 |
+
```
|
72 |
+
|
73 |
+
response received:
|
74 |
+
|
75 |
+
```
|
76 |
+
{
|
77 |
+
"success": false,
|
78 |
+
"message": "This voice is still building and cannot be used at this time."
|
79 |
+
}
|
80 |
+
```
|
81 |
+
|
82 |
+
Same for voice id "10f91c43"
|