...
 
Commits (4)
    https://gitcode.net/paddlepaddle/DeepSpeech/-/commit/17f2944a175939e179ff2d86a00b3c44027727bb fix error in tts/st 2023-05-22T10:39:48+00:00 zoooo0820 zoooo0820@qq.com https://gitcode.net/paddlepaddle/DeepSpeech/-/commit/4453430ac0d6c2d42f520191b0e2fb3e5c310967 Merge pull request #3265 from zoooo0820/fix_0d_error 2023-05-29T10:32:24+08:00 Hui Zhang zhtclz@foxmail.com fix error in tts and st for 0-d tensor https://gitcode.net/paddlepaddle/DeepSpeech/-/commit/cb2f566ed226e97bcb8d506dbfb54675fa45851f Update released_model.md 2023-05-29T10:34:37+08:00 Hui Zhang zhtclz@foxmail.com https://gitcode.net/paddlepaddle/DeepSpeech/-/commit/a3c3317a65a4c63d1d82fcdb151722b8cc09b20b Merge pull request #3281 from PaddlePaddle/zh794390558-patch-1 2023-05-29T10:34:58+08:00 Hui Zhang zhtclz@foxmail.com Update released_model.md
# Released Models
> !!! Since PaddlePaddle support 0-D tensor from 2.5.0, PaddleSpeech Static model will not work for it, please re-export static model.
## Speech-to-Text Models
### Speech Recognition Model
......
......@@ -252,7 +252,7 @@ class STExecutor(BaseExecutor):
norm_feat = dict(kaldiio.load_ark(process.stdout))[utt_name]
self._inputs["audio"] = paddle.to_tensor(norm_feat).unsqueeze(0)
self._inputs["audio_len"] = paddle.to_tensor(
self._inputs["audio"].shape[1], dtype="int64")
self._inputs["audio"].shape[1:2], dtype="int64")
else:
raise ValueError("Wrong model type.")
......
......@@ -491,7 +491,7 @@ class TTSExecutor(BaseExecutor):
# multi speaker
if am_dataset in {'aishell3', 'vctk', 'mix', 'canton'}:
mel = self.am_inference(
part_phone_ids, spk_id=paddle.to_tensor(spk_id))
part_phone_ids, spk_id=paddle.to_tensor([spk_id]))
else:
mel = self.am_inference(part_phone_ids)
self.am_time += (time.time() - am_st)
......
......@@ -783,7 +783,7 @@ class FastSpeech2(nn.Layer):
x = paddle.cast(text, 'int64')
d, p, e = durations, pitch, energy
# setup batch axis
ilens = paddle.shape(x)[0]
ilens = paddle.shape(x)[0:1]
xs = x.unsqueeze(0)
......
......@@ -181,7 +181,7 @@ def make_pad_mask(lengths, xs=None, length_dim=-1):
if length_dim == 0:
raise ValueError("length_dim cannot be 0: {}".format(length_dim))
bs = paddle.shape(lengths)[0]
bs = paddle.shape(lengths)
if xs is None:
maxlen = paddle.cast(lengths.max(), dtype=bs.dtype)
else:
......