[GH-ISSUE #46] TypeError: VC.pipeline() got multiple values for argument 'f0_file' #34

Open
opened 2026-10-20 09:53:19 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @asr-aditya on GitHub (Oct 14, 2024).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion/issues/46

I am trying to run VoiceConversionWebUI/myinfer-v2-0528.py for inference but am facing multiple argument error.
Why are we passing so many parameters to vc.pipeline when it only has 7 defined inputs?

audio_opt=vc.pipeline(hubert_model,net_g,sid,audio,input_audio,times,f0_up_key,f0_method,file_index,index_rate,if_f0,filter_radius,tgt_sr,resample_sr,rms_mix_rate,version,protect,f0_file=f0_file)
 def pipeline(self,model,net_g,dv,audio,times,f0_up_key,f0_file=None):
        audio_pad = np.pad(audio, (self.window // 2, self.window // 2), mode='reflect')
        opt_ts = []
        if(audio_pad.shape[0]>self.t_max):
            audio_sum = np.zeros_like(audio)
            for i in range(self.window): audio_sum += audio_pad[i:i - self.window]
            for t in range(self.t_center, audio.shape[0],self.t_center):opt_ts.append(t - self.t_query + np.where(np.abs(audio_sum[t - self.t_query:t + self.t_query]) == np.abs(audio_sum[t - self.t_query:t + self.t_query]).min())[0][0])
        s = 0
        audio_opt=[]
        .......
        .......

Error

TypeError: VC.pipeline() got multiple values for argument 'f0_file'

Screenshot 2024-10-14 at 11 37 51 PM
Originally created by @asr-aditya on GitHub (Oct 14, 2024). Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion/issues/46 I am trying to run `VoiceConversionWebUI/myinfer-v2-0528.py` for inference but am facing multiple argument error. Why are we passing so many parameters to `vc.pipeline` when it only has 7 defined inputs? ``` audio_opt=vc.pipeline(hubert_model,net_g,sid,audio,input_audio,times,f0_up_key,f0_method,file_index,index_rate,if_f0,filter_radius,tgt_sr,resample_sr,rms_mix_rate,version,protect,f0_file=f0_file) ``` ``` def pipeline(self,model,net_g,dv,audio,times,f0_up_key,f0_file=None): audio_pad = np.pad(audio, (self.window // 2, self.window // 2), mode='reflect') opt_ts = [] if(audio_pad.shape[0]>self.t_max): audio_sum = np.zeros_like(audio) for i in range(self.window): audio_sum += audio_pad[i:i - self.window] for t in range(self.t_center, audio.shape[0],self.t_center):opt_ts.append(t - self.t_query + np.where(np.abs(audio_sum[t - self.t_query:t + self.t_query]) == np.abs(audio_sum[t - self.t_query:t + self.t_query]).min())[0][0]) s = 0 audio_opt=[] ....... ....... ``` ### Error `TypeError: VC.pipeline() got multiple values for argument 'f0_file'` <img width="1470" alt="Screenshot 2024-10-14 at 11 37 51 PM" src="https://github.com/user-attachments/assets/4b9240c5-b908-415f-8356-62433365c506">
Author
Owner

@alcoftTAO commented on GitHub (Oct 14, 2024):

In your code you're passing the positional parameters, then you're changing some by using a keyword, this creates a conflict.

Here's my fixed version:

audio_opt=vc.pipeline(hubert_model,net_g,sid,audio,input_audio,times,f0_up_key,f0_method,file_index,index_rate,if_f0,filter_radius,tgt_sr,resample_sr,rms_mix_rate,version,protect,f0_file)

I replaced f0_file=f0_file with f0_file.
This should work, if it doesn't works feel free to post a comment here.

<!-- gh-comment-id:2412077563 --> @alcoftTAO commented on GitHub (Oct 14, 2024): In your code you're passing the positional parameters, then you're changing some by using a keyword, this creates a conflict. Here's my fixed version: ```python audio_opt=vc.pipeline(hubert_model,net_g,sid,audio,input_audio,times,f0_up_key,f0_method,file_index,index_rate,if_f0,filter_radius,tgt_sr,resample_sr,rms_mix_rate,version,protect,f0_file) ``` I replaced **f0_file=f0_file** with **f0_file**. This should work, if it doesn't works feel free to post a comment here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RVC-Project/Retrieval-based-Voice-Conversion#34
No description provided.