This repository contains an auto-tune model for pitch correction using Python, Cog, and Replicate.
If you haven't already, install Cog:
pip install cog
Authenticate your local Cog installation with Replicate:
cog login
Follow the instructions to paste your Replicate token.
Push your model to Replicate (replace riffgen/auto-tune
with your own repo if needed):
cog push r8.im/riffgen/auto-tune
You can test the model locally by running:
python predict.py
Edit the __main__
block in predict.py
to change the input parameters, for example:
if __name__ == "__main__":
p = Predictor()
p.setup()
out = p.predict(
audio_file="https://your-audio-url.m4a",
autotune_style="balanced",
scale="D:maj",
correction_strength=0.8,
adaptive_strength=True,
smooth_transitions=True,
plot=False,
output_format="wav",
)
print("Output file:", out)
After pushing, you can run the model on Replicate via the web UI or API. The UI will let you:
- Upload or link to an audio file
- Choose a musical scale (key)
- Choose an auto-tune style (intensity)
- Adjust correction strength, adaptive, and smoothing
- Download the processed audio
For API usage, see the Replicate Python client docs.
Questions?
- See Cog documentation
- See Replicate documentation
- Or open an issue in this repo!