Retrieval-based-Voice-Conversion-WebUI icon indicating copy to clipboard operation
Retrieval-based-Voice-Conversion-WebUI copied to clipboard

Add support for 44.1khz audio

Open sharkeylaser opened this issue 1 year ago • 2 comments

I was wondering if it would be possible to add support for 44.1khz audio files without having to resample. It's also a common sample rate, so it might be good to have as an option. Thanks for your efforts!

sharkeylaser avatar Sep 22 '24 20:09 sharkeylaser

I believe it already supports this, it's just mislabeled in the GRadio menu. Basically: 40k=44.1k

I believe this because: Under "Train" the target sample rates are 40k and 48k, but the files generated by "Vocals/Accompaniment Separation & Reverberation Removal" are 44.1k (checked in Adobe and VLC), and when I selected "40k" in the "Train" menu, it works fine with those generated files. So moving forward i'm just sticking to a 40k (mislabeled)/44.1k workflow.

In the past I tried to use 48k and 24-bit because in post-production those are the "high quality" audio files that are required for delivery and QC check, but this module does not play well with 24-bit files, 16-bit works better, and I seem to remember 48k causing more errors as well.

secretgrampuh avatar Sep 23 '24 17:09 secretgrampuh

I believe it already supports this, it's just mislabeled in the GRadio menu. Basically: 40k=44.1k

I believe this because: Under "Train" the target sample rates are 40k and 48k, but the files generated by "Vocals/Accompaniment Separation & Reverberation Removal" are 44.1k (checked in Adobe and VLC), and when I selected "40k" in the "Train" menu, it works fine with those generated files. So moving forward i'm just sticking to a 40k (mislabeled)/44.1k workflow.

In the past I tried to use 48k and 24-bit because in post-production those are the "high quality" audio files that are required for delivery and QC check, but this module does not play well with 24-bit files, 16-bit works better, and I seem to remember 48k causing more errors as well.

I was looking into the infer-web.py file and noticed the only resulting commands were 32000, 40000, and 48000.

line 187

sr_dict = { # See line 1189 for choice, I added 32k as an experiment.
    "32k": 32000,
    "40k": 40000,
    "48k": 48000,
}

I appears that 44000 is not present? I'm an amateur here, but looking in the log window, I can see it is indeed processing for 40000 hertz only. I modified the choices and added in a choice 32k for an experiment because I have some voices that are 32k, and will also change the 40000 to 44000 and see how it goes, and report back here.

line 1177

    with gr.Row(): # experiment aka new file name variable is exp_dir1
                exp_dir1 = gr.Textbox(label=i18n("New voice file name:"), value="") # Default new file name value and sample rate value
                sr2 = gr.Radio(
                    label=(
                           "Sampling rate: (40kHz/44.1kHz or 48kHz) \
                            705 kbps = 44 kHz 16 bit Mono --------------- \
                            1058 kbps = 44 kHz 24 bit Mono -------------- \
                            1152 kbps = 48 kHz 24 bit Mono -------------- \
                            1411 kbps = 44 kHz 16 bit Stereo ------------ \
                            2116 kbps = 44 kHz 24 bit Stereo ------------ \
                            2304 kbps = 48 kHz 24 bit Stereo ------------ "
                           ),
                    choices=["32k", "40k", "48k"], # See line 187 for choice results
                    value="48k", # Default value 
                    interactive=True,
                )

(I added myself a little table here as reference earlier using using an audio file calculator, I'm just testing things here so feel free to ignore that.)

Feel free to correct me if I'm on the wrong track here.

Edit: Given up on this software. Applio works much better and actually installs with no bugs. I get the feeling Rvc web ui is abandoned because there are zero updates fixes or support here. It was s great concept though, hope the devs return one day to fix it.

MoeMonsuta avatar Sep 24 '24 01:09 MoeMonsuta