Search code examples
pythonaudio

How do I use the --step-size option in the crepe module?


I am using crepe for a Python project. The documentation for the module mentions that there is a --step-size command that will allow you to change how frequently the module analyzes pitch.


Solution

  • You can use it in console/terminal/bash/cmd.exe

    crepe --step-size 30 audio_file.wav 
    

    or

    python -m crepe --step-size 30 audio_file.wav 
    

    You can't use it directly in your script. You would have to check in documentation if some functions use similar argument.

    Or you would have to get crepe source code and see how it uses value from --step-size.


    EDIT:

    Digging in source code I see:

    get_activation( ..., step_size=10)
    
    predict( ..., step_size=10)
    
    process_file( ..., step_size=10)
    

    So it seems you can use this value in all these functions.