From 188444f77841725fd720cb1115fd700bc6363615 Mon Sep 17 00:00:00 2001 From: zxcd <228587199@qq.com> Date: Sun, 29 Sep 2024 11:22:13 +0800 Subject: [PATCH 1/3] fix (#3856) --- README.md | 2 +- paddlespeech/cls/exps/panns/deploy/predict.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 19ec61cb0..5197ff4c7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - + diff --git a/paddlespeech/cls/exps/panns/deploy/predict.py b/paddlespeech/cls/exps/panns/deploy/predict.py index f14b44215..866a669e8 100644 --- a/paddlespeech/cls/exps/panns/deploy/predict.py +++ b/paddlespeech/cls/exps/panns/deploy/predict.py @@ -17,7 +17,7 @@ import os import numpy as np from paddle import inference from paddle.audio.datasets import ESC50 -from paddle.audio.features import MelSpectrogram +from paddle.audio.features import LogMelSpectrogram from paddleaudio.backends import soundfile_load as load_audio from scipy.special import softmax @@ -53,7 +53,10 @@ def extract_features(files: str, **kwargs): pad_width = max_length - len(waveforms[i]) waveforms[i] = np.pad(waveforms[i], pad_width=(0, pad_width)) - feat = MelSpectrogram(waveforms[i], sr, **kwargs).transpose() + feature_extractor = LogMelSpectrogram(sr, **kwargs) + feat = feature_extractor(paddle.to_tensor(waveforms[i])) + feat = paddle.transpose(feat, perm=[1, 0]).unsqueeze(0) + feats.append(feat) return np.stack(feats, axis=0) From bf03c9a620463962b79a5ed3b9f1dbb8c0340fb1 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Tue, 8 Oct 2024 14:30:39 +0800 Subject: [PATCH 2/3] Add server ci (#3857) * Add server ci * fix --- tests/unit/ci.sh | 5 +++++ tools/Dockerfile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/ci.sh b/tests/unit/ci.sh index 9342a2685..72b4678d6 100644 --- a/tests/unit/ci.sh +++ b/tests/unit/ci.sh @@ -26,6 +26,11 @@ function main(){ cd ${speech_ci_path}/cli bash test_cli.sh echo "End cli" + + echo "Start server" + cd ${speech_ci_path}/server/offline + bash test_server_client.sh + echo "End server" } main diff --git a/tools/Dockerfile b/tools/Dockerfile index 18596f32c..b2f2b3125 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -1,4 +1,4 @@ FROM registry.baidubce.com/paddlepaddle/paddle:latest-dev-cuda11.2-cudnn8.2-trt8.0-gcc82 RUN apt-get update -y -RUN apt-get -y install libsndfile1 +RUN apt-get -y install libsndfile1 lsof RUN pip3.8 install pytest-runner From 658d19a73e2c8af06f5e17efd5b3885eb0689018 Mon Sep 17 00:00:00 2001 From: zxcd <228587199@qq.com> Date: Wed, 9 Oct 2024 17:38:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E3=80=90doc=E3=80=91add=20Squeezeformer=20?= =?UTF-8?q?info=20in=20README=20(#3860)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update README.md * Update README_cn.md * Update README_cn.md --- README.md | 1 + README_cn.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 5197ff4c7..00367d787 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ Via the easy-to-use, efficient, flexible and scalable implementation, our vision ### Recent Update - 👑 2023.05.31: Add [WavLM ASR-en](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/examples/librispeech/asr5), WavLM fine-tuning for ASR on LibriSpeech. +- 🎉 2023.05.18: Add [Squeezeformer](https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/examples/aishell/asr1), Squeezeformer training for ASR on Aishell. - 👑 2023.05.04: Add [HuBERT ASR-en](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/examples/librispeech/asr4), HuBERT fine-tuning for ASR on LibriSpeech. - ⚡ 2023.04.28: Fix [0-d tensor](https://github.com/PaddlePaddle/PaddleSpeech/pull/3214), with the upgrade of paddlepaddle==2.5, the problem of modifying 0-d tensor has been solved. - 👑 2023.04.25: Add [AMP for U2 conformer](https://github.com/PaddlePaddle/PaddleSpeech/pull/3167). diff --git a/README_cn.md b/README_cn.md index 7aef30871..d70940dd2 100644 --- a/README_cn.md +++ b/README_cn.md @@ -184,6 +184,7 @@ ### 近期更新 - 👑 2023.05.31: 新增 [WavLM ASR-en](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/examples/librispeech/asr5), 基于WavLM的英语识别微调,使用LibriSpeech数据集 +- 🎉 2023.05.18: 新增 [Squeezeformer](https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/examples/aishell/asr1), 使用Squeezeformer进行训练,使用Aishell数据集 - 👑 2023.05.04: 新增 [HuBERT ASR-en](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/examples/librispeech/asr4), 基于HuBERT的英语识别微调,使用LibriSpeech数据集 - ⚡ 2023.04.28: 修正 [0-d tensor](https://github.com/PaddlePaddle/PaddleSpeech/pull/3214), 配合PaddlePaddle2.5升级修改了0-d tensor的问题。 - 👑 2023.04.25: 新增 [U2 conformer 的 AMP 训练](https://github.com/PaddlePaddle/PaddleSpeech/pull/3167).