Skip to content

Commit 4cd2de0

Browse files
committed
fix Pillow's version
1 parent bc93bff commit 4cd2de0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ onnxruntime
2222
pandas
2323
paddlenlp
2424
paddlespeech_feat
25+
Pillow>=9.0.0
2526
praatio==5.0.0
2627
pypinyin
2728
pypinyin-dict

paddlespeech/s2t/frontend/augmentor/spec_augment.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import numpy as np
1818
from PIL import Image
19-
from PIL.Image import Resampling
2019

2120
from paddlespeech.s2t.frontend.augmentor.base import AugmentorBase
2221
from paddlespeech.s2t.utils.log import Log
@@ -164,9 +163,9 @@ def time_warp(self, x, mode='PIL'):
164163
window) + 1 # 1 ... t - 1
165164

166165
left = Image.fromarray(x[:center]).resize((x.shape[1], warped),
167-
Resampling.BICUBIC)
166+
Image.BICUBIC)
168167
right = Image.fromarray(x[center:]).resize((x.shape[1], t - warped),
169-
Resampling.BICUBIC)
168+
Image.BICUBIC)
170169
if self.inplace:
171170
x[:warped] = left
172171
x[warped:] = right

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"pandas",
4949
"paddlenlp",
5050
"paddlespeech_feat",
51+
"Pillow>=9.0.0"
5152
"praatio==5.0.0",
5253
"pypinyin",
5354
"pypinyin-dict",
@@ -87,7 +88,6 @@
8788
"gpustat",
8889
"paddlespeech_ctcdecoders",
8990
"phkit",
90-
"Pillow",
9191
"pybind11",
9292
"pypi-kenlm",
9393
"snakeviz",

0 commit comments

Comments
 (0)