Skip to content

Command-Line Interface

Applio provides a command-line interface through core.py that allows you to perform all major operations without the Gradio web UI. This is useful for automation, headless servers, cloud environments, and advanced scripting.

Terminal window
python core.py <command> [options]
OptionDescription
-h, --helpShow help message and exit

Convert a single audio file using a voice model.

Terminal window
python core.py infer -i <input> -o <output> -m <model> [options]
OptionAliasDescriptionDefault
--input-audio-path-iPath to the input audio fileRequired
--output-audio-path-oPath to save the converted audioRequired
--model-path-mPath to the model .pth fileRequired
--index-path-idPath to the .index fileNone
--pitch-pPitch adjustment in semitones0
--filter-radius-rFilter radius for artifact reduction3
--search-feature-ratio-sIndex search feature ratio (0.0 - 1.0)0.6
--volume-envelope-vVolume envelope blending ratio1
--protect-voiceless-consonants-cProtection amount for voiceless consonants0.5
--hop-length-hlHop length for pitch tracking128
--f0-method-fPitch extraction method (rmvpe, crepe, crepe-tiny, fcpe, hybrid)rmvpe
--f0-file-ffPath to external F0 curve fileNone
--embedder-model-eEmbedder model namecontentvec
--export-format-efOutput audio format (wav, mp3, flac, ogg, m4a)wav
--upscale-uEnable audio upscalingFalse
--clean-clEnable noise reduction cleaningFalse
--clean-strength-csNoise reduction strength0
--autotune-atEnable autotuneFalse
--autotune-strength-asAutotune strength1
--split-audio-saEnable audio splitting for long filesFalse
--reverb-rvReverb amount (0-100)0
--pitch-shift-psPost-processing pitch shift (semitones)0
--limiter-lLimiter threshold (0-100)0
--gain-gGain adjustment (dB)0
--distortion-dDistortion amount (0-100)0
--chorus-chChorus amount (0-100)0
--bitcrush-bcBitcrush amount (0-100)0
--clipping-clpClipping threshold (0-100)0
--compressor-cmpCompressor amount (0-100)0
--delay-dlDelay amount (0-100)0
--formant-shift-fsFormant shift quefrency0
--formant-timbre-ftFormant shift timbre1
--formant-q-fqFormant shift Q factor5

Convert multiple audio files in a directory.

Terminal window
python core.py batch_infer -i <input_folder> -o <output_folder> -m <model> [options]
OptionAliasDescriptionDefault
--input-folder-iPath to folder containing input audio filesRequired
--output-folder-oPath to folder for output filesRequired
--model-path-mPath to the model .pth fileRequired
All inference optionsSame as infer commandSame as infer

Generate speech from text using Edge TTS, optionally passing through voice conversion.

Terminal window
python core.py tts -t <text> -v <voice> [options]
OptionAliasDescriptionDefault
--text-tText to synthesizeRequired
--tts-voice-vTTS voice name (from edge-tts)Required
--tts-rate-trTTS speech rate adjustment+0%
--model-path-mPath to voice model .pth for VC after TTSNone
--index-path-idPath to .index file for VCNone
--pitch-pPitch adjustment after TTS0
--f0-method-fPitch extraction methodrmvpe
--embedder-model-eEmbedder modelcontentvec
All post-processing optionsSame as inferSame as infer

Preprocess a dataset for training.

Terminal window
python core.py preprocess -n <model_name> -sr <sample_rate> [options]
OptionAliasDescriptionDefault
--model-name-nName of the model/datasetRequired
--sample-rate-srTarget sample rate (32k, 40k, 48k)40k
--cpu-cpuProcess on CPU instead of GPUFalse

Extract features (F0 and embeddings) from a preprocessed dataset.

Terminal window
python core.py extract -n <model_name> -sr <sample_rate> -f <f0_method> -e <embedder>
OptionAliasDescriptionDefault
--model-name-nName of the modelRequired
--sample-rate-srSample rate (32k, 40k, 48k)40k
--f0-method-fPitch extraction methodrmvpe
--embedder-model-eEmbedder modelcontentvec
--cpu-cpuProcess on CPUFalse

Train a voice model.

Terminal window
python core.py train -n <model_name> -sr <sample_rate> -f <f0_method> -e <embedder> [options]
OptionAliasDescriptionDefault
--model-name-nName of the modelRequired
--sample-rate-srSample rate (32k, 40k, 48k)40k
--f0-method-fPitch extraction methodrmvpe
--embedder-model-eEmbedder modelcontentvec
--save-every-epoch-sSave checkpoint every N epochs10
--total-epoch-teTotal number of training epochs200
--batch-size-bTraining batch size6
--pretrained-g-pgPath to pre-trained generatorNone
--pretrained-d-pdPath to pre-trained discriminatorNone
--vocoder-vVocoder type (hifigan, nsf-hifigan, refinegan)hifigan
--index-iTrain index after trainingTrue

Generate a FAISS or KMeans index from extracted features.

Terminal window
python core.py index -n <model_name>
OptionAliasDescriptionDefault
--model-name-nName of the trained modelRequired

Display metadata about a trained model.

Terminal window
python core.py model_information -m <model_path>
OptionAliasDescriptionDefault
--model-path-mPath to the .pth model fileRequired

Output includes: version, sample rate, whether F0 was used, embedder name, epoch count, step count.

Blend two model weights into a new model using linear interpolation.

Terminal window
python core.py model_blender -m1 <model_a> -m2 <model_b> -o <output> -r <ratio>
OptionAliasDescriptionDefault
--model-a-m1Path to first model .pthRequired
--model-b-m2Path to second model .pthRequired
--output-oPath for the blended output .pthRequired
--ratio-rBlend ratio (0.0 = all model A, 1.0 = all model B)0.5

Launch TensorBoard for monitoring training progress.

Terminal window
python core.py tensorboard

Download a model from a URL (HuggingFace, Google Drive, or direct link).

Terminal window
python core.py download -u <url>
OptionAliasDescriptionDefault
--url-uDownload URL for the modelRequired

Download and install required prerequisites (pretrained models, predictors, embedders).

Terminal window
python core.py prerequisites

Analyze an audio file and display spectral information.

Terminal window
python core.py audio_analyzer -i <input_audio>
OptionAliasDescriptionDefault
--input-audio-path-iPath to the audio file to analyzeRequired

Basic inference with a model:

Terminal window
python core.py infer -i my_speech.wav -o converted.wav -m logs/MyModel/G_1234.pth -id logs/MyModel/MyModel.index

Batch inference with pitch adjustment:

Terminal window
python core.py batch_infer -i ./input_folder -o ./output_folder -m logs/Singer/G_5678.pth -p -2 -f crepe

Full training pipeline:

Terminal window
python core.py preprocess -n MyVoice -sr 40k
python core.py extract -n MyVoice -sr 40k -f rmvpe -e contentvec
python core.py train -n MyVoice -sr 40k -f rmvpe -e contentvec -b 8 -te 300 -pg pretrained/G_40k.pth -pd pretrained/D_40k.pth

TTS with voice conversion:

Terminal window
python core.py tts -t "Hello, this is a test." -v "en-US-JennyNeural" -m logs/MyModel/G_1234.pth -id logs/MyModel/MyModel.index

Blend two models:

Terminal window
python core.py model_blender -m1 logs/ModelA/G_100.pth -m2 logs/ModelB/G_200.pth -o logs/Blended/G_blended.pth -r 0.6

Inspect model metadata:

Terminal window
python core.py model_information -m logs/MyModel/G_1234.pth