Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.10.0
Aimastering.AudioApi
All URIs are relative to https://api.bakuage.com:443
| Method | HTTP request | Description |
|---|---|---|
| createAudio | POST /audios | Create a new audio. |
| downloadAudio | GET /audios/{id}/download | Download an audio data by id. |
| downloadAudioByToken | GET /audios/download_by_token | Download an audio data by audio_download_token. |
| getAudio | GET /audios/{id} | Get an audio by id. |
| getAudioAnalysis | GET /audios/{id}/analysis | Get an audio analysis by id. |
| getAudioDownloadToken | GET /audios/{id}/download_token | Get an audio download token by id. |
| listAudios | GET /audios | Get all audios accessable. |
createAudio
Audio createAudio(opts)
Create a new audio.
Example
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var opts = {
'file': "/path/to/file.txt", // File | The file to upload.
'name': "name_example" // String | Audio name. If this is not specified, the name in file parameter is used.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createAudio(opts, callback);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| file | File | The file to upload. | [optional] |
| name | String | Audio name. If this is not specified, the name in file parameter is used. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
downloadAudio
'Blob' downloadAudio(id)
Download an audio data by id.
Example
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var id = 56; // Number | Audio id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.downloadAudio(id, callback);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Audio id |
Return type
'Blob'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/octet-stream
downloadAudioByToken
'Blob' downloadAudioByToken(downloadToken)
Download an audio data by audio_download_token.
Example
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var downloadToken = "downloadToken_example"; // String | Audio download token
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.downloadAudioByToken(downloadToken, callback);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| downloadToken | String | Audio download token |
Return type
'Blob'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/octet-stream
getAudio
Audio getAudio(id)
Get an audio by id.
Example
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var id = 56; // Number | Audio id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAudio(id, callback);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Audio id |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
getAudioAnalysis
AudioAnalysis getAudioAnalysis(id)
Get an audio analysis by id.
Example
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var id = 56; // Number | Audio id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAudioAnalysis(id, callback);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Audio id |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
getAudioDownloadToken
AudioDownloadToken getAudioDownloadToken(id)
Get an audio download token by id.
Example
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var id = 56; // Number | Audio id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAudioDownloadToken(id, callback);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Audio id |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
listAudios
[Audio] listAudios()
Get all audios accessable.
Example
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.listAudios(callback);
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json