Before training, you must extract audio codec tokens and speaker conditions from your dataset.
Input Format:
The ${audio_list} file must follow a specific format where each line contains an audio file path and its corresponding transcript, separated by a tab (\t):
/path/to/audio.wav The transcript text goes here.
Command:
Run the extract_codec.py tool with the --extract_condition flag.
Output:
Processed files and a speaker_info.json file will be generated in the finetune_data/processed_data/ directory. The speaker_info.json contains metadata for each speaker, including avg_duration, sample_num, total_duration_in_seconds, and paths to train_jsonl, valid_jsonl, and medoid_condition.npy files.
# Extract tokens and speaker conditions
python tools/extract_codec.py --audio_list ${audio_list} --extract_condition