Skip to content

Commit 1092c1f

Browse files
BBC-Esqfumiama
andauthored
feat: numpy 2+ support (#937)
Co-authored-by: 源文雨 <[email protected]>
1 parent 46ad65f commit 1092c1f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ChatTTS/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,10 @@ def infer(
259259
return res_gen
260260
elif not refine_text_only:
261261
stripped_wavs = []
262+
thr = np.float32(1e-5)
262263
for wavs in res_gen:
263264
for wav in wavs:
264-
stripped_wavs.append(wav[np.abs(wav) > 1e-5])
265+
stripped_wavs.append(wav[np.abs(wav) > thr])
265266
if split_text:
266267
return [np.concatenate(stripped_wavs)]
267268
return stripped_wavs

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
numpy<2.0.0
1+
numpy<3.0.0
22
numba
33
torch>=2.1.0
44
torchaudio

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
license="AGPLv3+",
2121
install_requires=[
2222
"numba",
23-
"numpy<2.0.0",
23+
"numpy<3.0.0",
2424
"pybase16384",
2525
"torch>=2.1.0",
2626
"torchaudio",

0 commit comments

Comments
 (0)