We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96e3d8a commit 9ee9f5fCopy full SHA for 9ee9f5f
infer/modules/vc/pipeline.py
@@ -324,11 +324,13 @@ def pipeline(
324
if hasattr(f0_file, "name"):
325
try:
326
with open(f0_file.name, "r") as f:
327
- lines = f.read().strip("\n").split("\n")
328
- inp_f0 = []
329
- for line in lines:
330
- inp_f0.append([float(i) for i in line.split(",")])
331
- inp_f0 = np.array(inp_f0, dtype="float32")
+ raw_lines = f.read()
+ if len(raw_lines) > 0:
+ lines = raw_lines.strip("\n").split("\n")
+ inp_f0 = []
+ for line in lines:
332
+ inp_f0.append([float(i) for i in line.split(",")])
333
+ inp_f0 = np.array(inp_f0, dtype="float32")
334
except:
335
traceback.print_exc()
336
sid = torch.tensor(sid, device=self.device).unsqueeze(0).long()
0 commit comments