Skip to content

Commit 2cafde1

Browse files
authored
修复报错 TypeError:'type' object is not subscriptable. (#1087)
1 parent 35e7554 commit 2cafde1

File tree

1 file changed

+3
-3
lines changed
  • GPT_SoVITS/TTS_infer_pack

1 file changed

+3
-3
lines changed

GPT_SoVITS/TTS_infer_pack/TTS.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
sys.path.append(now_dir)
1010
import ffmpeg
1111
import os
12-
from typing import Generator, List, Union
12+
from typing import Generator, List, Tuple, Union
1313
import numpy as np
1414
import torch
1515
import torch.nn.functional as F
@@ -591,7 +591,7 @@ def run(self, inputs:dict):
591591
"repetition_penalty": 1.35 # float. repetition penalty for T2S model.
592592
}
593593
returns:
594-
tuple[int, np.ndarray]: sampling rate and audio data.
594+
Tuple[int, np.ndarray]: sampling rate and audio data.
595595
"""
596596
########## variables initialization ###########
597597
self.stop_flag:bool = False
@@ -874,7 +874,7 @@ def audio_postprocess(self,
874874
speed_factor:float=1.0,
875875
split_bucket:bool=True,
876876
fragment_interval:float=0.3
877-
)->tuple[int, np.ndarray]:
877+
)->Tuple[int, np.ndarray]:
878878
zero_wav = torch.zeros(
879879
int(self.configs.sampling_rate * fragment_interval),
880880
dtype=self.precision,

0 commit comments

Comments
 (0)