Create a recording
This endpoint creates a recording for a particular voice.
HTTP Request
POST https://app.resemble.ai/api/v2/voices/<voice_uuid>/recordings
URL Parameters | Type | Description |
---|---|---|
voice_uuid | string | UUID of the voice to which the recording belongs |
Multipart Form Body | Type | Description |
---|---|---|
file | File | Recording audio file |
emotion | string | Emotion of the recording |
is_active | boolean | If false, the recording is not used to train the voice model |
name | string | Name of the recording |
text | string | Transcript of the recording |
HTTP Response
{
"success": true,
"item": {
"uuid": <string>,
"name": <string>,
"text": <string>,
"emotion": <string>,
"is_active": <boolean>,
"audio_src": Optional<string>,
"created_at": <UTC string>,
"updated_at": <UTC string>,
}
}
Examples
NodeJS
1
2
3
4
5
6
7
8
9
10
11
12
13
const Resemble = require('@resemble/node')
const resemble = new Resemble('v2', 'YOUR_API_TOKEN')
const fs = require('fs')
const file = fs.createReadStream('happy_sample.wav')
const fileSize = fs.statSync('happy_sample.wav').size
await resemble.recordings.create(voiceUuid, {
emotion: 'happy',
is_active: true,
name: 'happy_sample',
text: 'Hey, this is a happy sample!'
}, file, fileSize)
Try it out
API Key:
Voice UUID:
Multipart Body:
File:
Emotion:
Name:
Text:
Is Active: