Commit 26b06316 authored by duanjinfei's avatar duanjinfei

update document

parent c262ad2e
---
title: Bark API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Bark API Usage Guide
## Introduction
Bark is a transformer-based text-to-audio model created by Suno. Bark can generate highly realistic, multilingual speech as well as other audio - including music, background noise and simple sound effects. The model can also produce nonverbal communications like laughing, sighing and crying. To support the research community, we are providing access to pretrained model checkpoints ready for inference.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input: {
"prompt": "Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe."
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/bark", data, price);
// Handle response
console.log("Bark result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `prompt`: String, the text content to be converted into speech.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Blip API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Blip API Usage Guide
## Introduction
Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input: {
"task": "image_captioning",
"image": "https://replicate.delivery/mgxm/f4e50a7b-e8ca-432f-8e68-082034ebcc70/demo.jpg"
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/blip", data, price);
// Handle response
} catch (error) {
// Error handling
}
```
### Parameter Description
- `task`: String, the text content to be converted into speech.
- `image`: String, the URL of the audio file used as the voice sample for cloning.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Blip-2 API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Blip-2 API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Blip-2 API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"image": "https://replicate.delivery/pbxt/IJEPmgAlL2zNBNDoRRKFegTEcxnlRhoQxlNjPHSZEy0pSIKn/gg_bridge.jpeg",
"caption": false,
"question": "what body of water does this bridge cross?",
"temperature": 1
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/blip-2", data, price);
// Handle response
console.log("Blip-2 result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `image`: String, the text content to be converted into speech.
- `caption`: String, the URL of the audio file used as the voice sample for cloning.
- `question`: String, specifies the language of the text, with "en" indicating English.
- `temperature`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Chattts API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# C ha t t t s API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Chattts API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"text": "chat T T S 是一款强大的对话式文本转语音模型。它有中英混读和多说话人的能力。\nchat T T S 不仅能够生成自然流畅的语音,还能控制[laugh]笑声啊[laugh],\n停顿啊[uv_break]语气词啊等副语言现象[uv_break]。这个韵律超越了许多开源模型[uv_break]。\n请注意,chat T T S 的使用应遵守法律和伦理准则,避免滥用的安全风险。[uv_break]",
"top_k": 20,
"top_p": 0.7,
"voice": 2222,
"prompt": "",
"skip_refine": 0,
"temperature": 0.3,
"custom_voice": 0
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/chattts", data, price);
// Handle response
console.log("Chattts result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `text`: String, the text content to be converted into speech.
- `speaker`: String, the URL of the audio file used as the voice sample for cloning.
- `language`: String, specifies the language of the text, with "en" indicating English.
- `cleanup_voice`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Co de API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Codeformer API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Codeformer API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"image": "https://replicate.delivery/mgxm/7534e8f1-ee01-4d66-ae40-36343e5eb44a/003.png",
"upscale": 2,
"face_upsample": true,
"background_enhance": true,
"codeformer_fidelity": "0.1"
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/codeformer", data, price);
// Handle response
console.log("Codeformer result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `image`: String, the text content to be converted into speech.
- `upscale`: String, the URL of the audio file used as the voice sample for cloning.
- `face_upsample`: String, specifies the language of the text, with "en" indicating English.
- `background_enhance`: Boolean, whether to perform cleanup processing on the generated voice.
- `codeformer_fidelity`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Controlnet API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Controlnet API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Controlnet API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"seed": 20,
"image": "https://replicate.delivery/pbxt/IYQLHLFDraqCrjDUoiwpM9xBhQM1eQVHbxBiNxcbwctUamzb/user_1.png",
"scale": 9,
"steps": 20,
"prompt": "a photo of a brightly colored turtle",
"a_prompt": "Best quality, extremely detailed",
"n_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"structure": "scribble",
"num_samples": "1",
"low_threshold": 100,
"high_threshold": 200,
"image_resolution": "512"
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/controlnet", data, price);
// Handle response
console.log("Controlnet result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `text`: String, the text content to be converted into speech.
- `speaker`: String, the URL of the audio file used as the voice sample for cloning.
- `language`: String, specifies the language of the text, with "en" indicating English.
- `cleanup_voice`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
```js
output: [
"https://replicate.delivery/pbxt/BKfYyssmWUUDWiukeXLAQc47KUPBwDMCdbxd8esqr3yE06eDB/out-0.png"
]
```
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: DreamBooth API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# DreamBooth API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the DreamBooth API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"seed": 1337,
"adam_beta1": 0.9,
"adam_beta2": 0.999,
"resolution": 512,
"adam_epsilon": 1e-8,
"class_prompt": "a cat",
"lr_scheduler": "constant",
"instance_data": "https://replicate.delivery/pbxt/HlRmIY3SePK6D8ZgnTvgymRWRSFqJlrDrfxJjA6QAazg1wVl/data.zip",
"learning_rate": 0.000001,
"max_grad_norm": 1,
"n_save_sample": 4,
"use_8bit_adam": false,
"instance_prompt": "a cjw cat",
"max_train_steps": 1000,
"num_class_images": 100,
"num_train_epochs": 1,
"save_infer_steps": 50,
"train_batch_size": 1,
"adam_weight_decay": 0.01,
"prior_loss_weight": 1,
"sample_batch_size": 4,
"train_text_encoder": true,
"save_guidance_scale": 7.5,
"gradient_checkpointing": false,
"with_prior_preservation": true,
"gradient_accumulation_steps": 1
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/dreambooth", data, price);
// Handle response
console.log("DreamBooth result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `text`: String, the text content to be converted into speech.
- `speaker`: String, the URL of the audio file used as the voice sample for cloning.
- `language`: String, specifies the language of the text, with "en" indicating English.
- `cleanup_voice`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Gfpgan API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Gfpgan API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Gfpgan API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"img": "https://replicate.delivery/mgxm/59d9390c-b415-47e0-a907-f81b0d9920f1/187400315-87a90ac9-d231-45d6-b377-38702bd1838f.jpg",
"scale": 2,
"version": "v1.4"
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/gfpgan", data, price);
// Handle response
console.log("Gfpgan result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `img`: String, the text content to be converted into speech.
- `scale`: String, the URL of the audio file used as the voice sample for cloning.
- `version`: String, specifies the language of the text, with "en" indicating English.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: MiniGpt-4 API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# MiniGpt-4 API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the MiniGpt-4 API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"image": "https://replicate.delivery/pbxt/IqG1MbemhULihtfr62URRZbI29XtcPsnOYASrTDQ6u5oSqv9/llama_13b.png",
"top_p": 0.9,
"prompt": "This llama's name is Dave. Write me a story about how Dave found his skateboard.",
"num_beams": 5,
"max_length": 4000,
"temperature": 1.32,
"max_new_tokens": 3000,
"repetition_penalty": 1
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/minigpt-4", data, price);
// Handle response
console.log("MiniGpt-4 result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `text`: String, the text content to be converted into speech.
- `speaker`: String, the URL of the audio file used as the voice sample for cloning.
- `language`: String, specifies the language of the text, with "en" indicating English.
- `cleanup_voice`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Real-Esrgan API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Real-Esrgan API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Real-Esrgan API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"image": "https://replicate.delivery/pbxt/Ing7Fa4YMk6YtcoG1YZnaK3UwbgDB5guRc5M2dEjV6ODNLMl/cat.jpg",
"scale": 2,
"face_enhance": false
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/real-esrgan", data, price);
// Handle response
console.log("Real-Esrgan result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `text`: String, the text content to be converted into speech.
- `speaker`: String, the URL of the audio file used as the voice sample for cloning.
- `language`: String, specifies the language of the text, with "en" indicating English.
- `cleanup_voice`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Sdxl API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Sdxl API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Sdxl API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"width": 768,
"height": 768,
"prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"num_inference_steps": 25
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/sdxl", data, price);
// Handle response
console.log("Sdxl result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `text`: String, the text content to be converted into speech.
- `speaker`: String, the URL of the audio file used as the voice sample for cloning.
- `language`: String, specifies the language of the text, with "en" indicating English.
- `cleanup_voice`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Stable-Diffusion API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Stable-Diffusion API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Stable-Diffusion API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:{
"prompt": "an astronaut riding a horse on mars, hd, dramatic lighting",
"scheduler": "K_EULER",
"num_outputs": 1,
"guidance_scale": 7.5,
"image_dimensions": "512x512",
"num_inference_steps": 50
}
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/stable-diffusion", data, price);
// Handle response
console.log("Stable-Diffusion result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `text`: String, the text content to be converted into speech.
- `speaker`: String, the URL of the audio file used as the voice sample for cloning.
- `language`: String, specifies the language of the text, with "en" indicating English.
- `cleanup_voice`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
---
title: Whisper API Usage Guide
slug: 6DCWoM_fbbp1XuSHH8vVc
createdAt: Thu Jul 18 2024 06:12:37 GMT+0000 (Coordinated Universal Time)
updatedAt: Thu Jul 18 2024 13:40:04 GMT+0000 (Coordinated Universal Time)
---
# Whisper API Usage Guide
## Introduction
This document will guide developers on how to use the aonweb library to call the Whisper API, which is used for voice cloning and text-to-speech conversion.
## Prerequisites
- Node.js environment
- `aonweb` library installed
- Valid Aonet APPID
## Basic Usage
### 1. Import Required Modules
```js
import { AI, AIOptions } from 'aonweb';
```
### 2. Initialize AI Instance
```js
const ai_options = new AIOptions({
appId: 'your_app_id_here',
dev_mode: true
});
const aonweb = new AI(ai_options);
```
### 3. Prepare Input Data
```js
const data = {
input:
};
```
### 4. Call the AI Model
```js
const price = 8; // Cost of the AI call
try {
const response = await aonweb.prediction("/predictions/ai/whisper", data, price);
// Handle response
console.log("Whisper result:", response);
} catch (error) {
// Error handling
console.error("Error generating :", error);
}
```
### Parameter Description
- `text`: String, the text content to be converted into speech.
- `speaker`: String, the URL of the audio file used as the voice sample for cloning.
- `language`: String, specifies the language of the text, with "en" indicating English.
- `cleanup_voice`: Boolean, whether to perform cleanup processing on the generated voice.
### Notes
- Ensure that the provided audio URL is publicly accessible and of good quality to achieve the best cloning effect.
- The API may take some time to process the input and generate the result, consider implementing appropriate wait or loading states.
- Handle possible errors, such as network issues, invalid input, or API limitations.
- Adhere to the terms of use and privacy regulations, especially when handling voice samples of others.
### Example Response
The API response will contain the URL of the generated cloned voice or other relevant information. Parse and use the response data according to the actual API documentation.
## Advanced Usage
- Implement batch text-to-speech conversion by processing multiple text segments in a loop or concurrent requests.
- Add a user interface that allows users to upload their own voice samples and input custom text.
- Implement voice post-processing features, such as adjusting volume, adding background music, or applying audio effects.
- Integrate a voice storage solution to save and manage the generated voice files.
- Consider implementing a voice recognition feature to convert the generated voice back to text for verification or other purposes.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment