AI Converter
API Tools
- API Tool provides some API for features: Sync Text, Normalize Audio Mp3
- Sync Text for Audio API Documentation
Endpoint
URL: https://aitools.monkeyenglish.net/segement
Method: POST
Parameters
Name | Type | Description | Required | Example |
---|---|---|---|---|
audio |
File (mp3) | Uploaded audio file in mp3 format | Yes | audio=@L2U6 - Chant 4 - Mr. Billy.mp3 |
karaoke_format |
Boolean | Option to convert to karaoke format or not | Yes | true or false |
text |
String | Text used for mapping sync text (Optional) | No | "Isn't this regular milk?" |
Returns
Name | Type | Description |
---|---|---|
data |
Object | Output of sync text function |
message |
String | Information about sync text successfully or state mapping |
status |
Boolean | True if the system completes tasks completely, else False |
exception |
String | Empty if completed task, else contains exception message |
Example Request
curl -X 'POST' \
'https://aitools.monkeyenglish.net/segement' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'audio=@L2U6 - Chant 4 - Mr. Billy.mp3;type=audio/mpeg' \
-F 'karaoke_format=false' \
-F 'text='
- API normalize mp3 file
Endpoint: https://aitools.monkeyenglish.net/normalize-audio`
Method: POST
Parameters
Name | Type | Description | Required | Example |
---|---|---|---|---|
file |
File (mp3) | Uploaded audio file in mp3 format | Yes | file=@L2U6 - Chant 4 - Mr. Billy.mp3 |
Returns
Name | Type | Description |
---|---|---|
data |
Object | Output of normalized audio file |
message |
String | Information about normalization success or failure |
status |
Boolean | True if the system completes tasks completely, else False |
exception |
String | Empty if completed task, else contains exception message |
Example Request
curl -X 'POST' \
'https://aitools.monkeyenglish.net/normalize-audio' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@L2U6 - Chant 4 - Mr. Billy.mp3;type=audio/mpeg'
Score Audio from CSV
POST /score_audio
Description: Processes an uploaded CSV or Excel file and returns a CSV file with processed results.
Request
Content-Type: multipart/form-data
Parameters:
file (required): An uploaded file in CSV or Excel format. The file should contain the data to be processed.
name_column_text (required): The name of the column in the file that contains text data.
name_column_audio (required): The name of the column in the file that contains audio data.
name_column_output (required): The name of the column where the processed results will be written.
Convert Audio API
Base URL
The base URL for the API is: https://aitools.monkeyenglish.net/
Endpoints
1. Convert MP3 to WAV
Endpoint: POST /mp3-to-wav/
Description: Converts an MP3 file to a WAV file.
Request:
file
: The MP3 file to be converted. (required)
Response:
- Returns a WAV file with
Content-Disposition
header set toattachment; filename={original_filename}.wav
.
2. Convert WAV to MP3
Endpoint: POST /wav-to-mp3/
Description: Converts a WAV file to an MP3 file.
Request:
file
: The WAV file to be converted. (required)
Response:
- Returns an MP3 file with
Content-Disposition
header set toattachment; filename={original_filename}.mp3
.
3. Normalize MP3
Endpoint: POST /normalize-mp3/
Description: Normalizes the volume of an MP3 file.
Request:
file
: The MP3 file to be normalized. (required)
Response:
- Returns a normalized MP3 file with
Content-Disposition
header set toattachment; filename={original_filename}_normalized.mp3
.
4. Normalize WAV
Endpoint: POST /normalize-wav/
Description: Normalizes the volume of a WAV file and optionally changes the sample rate and number of channels.
Request:
file
: The WAV file to be normalized. (required)sample_rate
: The sample rate for the output file. (optional, default: 44100)channels
: The number of channels for the output file. (optional, default: 2)
Response:
- Returns a normalized WAV file with
Content-Disposition
header set toattachment; filename={original_filename}_normalized.wav
.
5. Convert WAV to Normalized MP3
Endpoint: POST /wav-normalize-mp3/
Description: Converts a WAV file to an MP3 file and normalizes the volume.
Request:
file
: The WAV file to be converted and normalized. (required)
Response:
- Returns a normalized MP3 file with
Content-Disposition
header set toattachment; filename={original_filename}_normalized.mp3
.
6. Convert MP3 to Custom WAV
Endpoint: POST /mp3-custom-wav/
Description: Converts an MP3 file to a WAV file with custom sample rate and number of channels.
Request:
file
: The MP3 file to be converted. (required)sample_rate
: The sample rate for the output file. (optional, default: 44100)channels
: The number of channels for the output file. (optional, default: 2)
Response:
- Returns a WAV file with
Content-Disposition
header set toattachment; filename={original_filename}_normalized.wav
.
CLI Tools
- CLI Usage Document for
_sync_lip_sync.py
Overview
The _sync_lip_sync.py
script is designed to synchronize lip sync data from a source directory to a destination directory. This script is executed using Python 3 and takes two arguments: the source directory and the destination directory.
Prerequisites
- Ensure that Python 3 is installed on your system. You can download it from python.org.
- Make sure the
_sync_lip_sync.py
script is in your working directory or provide the full path to the script. - Ensure you have the necessary permissions to read from the source directory and write to the destination directory.
Usage
To run the _sync_lip_sync.py
script, open your terminal or command prompt and execute the following command:
python3 _sync_lip_sync.py <source_directory> <destination_directory>
- CLI Tool for Scoring Audio
Overview
This CLI tool is designed to score audio files based on transcripts provided in a CSV file. It downloads audio files from URLs specified in the CSV, processes them, and outputs the results to a specified CSV file.
Usage
To use the CLI tool, run the following command in your terminal:
```bash
python3 _scoring_audio_competition.py arg1 arg2 arg3 arg4
```
Arguments
-
arg1
: Input filename (CSV)- The path to the input CSV file containing the transcripts and URLs.
-
arg2
: Column text- The name of the column in the CSV file that contains the transcripts.
-
arg3
: Column URL- The name of the column in the CSV file that contains the URLs of the audio files to be downloaded.
-
arg4
: Output filename (CSV)- The path to the output CSV file where the scoring results will be saved.
Detailed Instructions
-
Prepare Input CSV File
- Create a CSV file with at least two columns: one for the transcripts and one for the URLs of the audio files.
- Ensure the column names match the values you will provide for
arg2
andarg3
.
Example:
```csv
transcript,url
"This is a sample transcript","http://example.com/audio1.mp3"
"Another transcript","http://example.com/audio2.mp3"
``` -
Run the Tool
- Open your terminal.
- Navigate to the directory where
_scoring_audio_competition.py
is located. - Run the following command, replacing
input.csv
,transcript
,url
, andoutput.csv
with your actual file and column names:
```bash
python3 _scoring_audio_competition.py input.csv transcript url output.csv
``` -
Output
- The tool will download the audio files from the URLs specified in the input CSV.
- It will process the audio files and score them based on the provided transcripts.
- The results will be saved in the output CSV file specified.
Example Command
Here is an example command based on the provided instructions:
```bash
python3 _scoring_audio_competition.py example_input.csv transcript url example_output.csv
```
In this example:
example_input.csv
is the input CSV file containing the transcripts and audio URLs.transcript
is the name of the column containing the transcripts.url
is the name of the column containing the audio URLs.example_output.csv
is the output CSV file where the scoring results will be saved.
Notes
- Ensure you have all necessary dependencies installed before running the script.
- The input CSV file should be well-formatted to avoid any errors during processing.
- The output CSV file will contain the results of the scoring process, which can be used for further analysis.