From 793a89d53c8904103488ab806b255f2a5467ea86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=98=A5=E4=B9=94?= <83450930+Liyulingyue@users.noreply.github.com> Date: Thu, 20 Feb 2025 20:30:36 +0800 Subject: [PATCH] fit with librosa (#3989) * fit with librosa * Update base_commands.py * Apply suggestions from code review * Apply suggestions from code review --- paddlespeech/cli/base_commands.py | 3 +++ setup.py | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/paddlespeech/cli/base_commands.py b/paddlespeech/cli/base_commands.py index dfeb5cae5..fb5a190ed 100644 --- a/paddlespeech/cli/base_commands.py +++ b/paddlespeech/cli/base_commands.py @@ -122,6 +122,9 @@ class StatsCommand: elif "multilingual" in key: line[4], line[1] = line[1].split("_")[0], line[1].split( "_")[1:] + # Avoid having arrays within the elements of the input parameters when passing them to numpy.array + if type(line[1]) is list: + line[1] = "/".join(line[1]) tmp = numpy.array(line) idx = [0, 5, 3, 4, 1, 2] line = tmp[idx] diff --git a/setup.py b/setup.py index 881b06deb..71e7aaf2a 100644 --- a/setup.py +++ b/setup.py @@ -88,9 +88,8 @@ base = [ "hyperpyyaml", "inflect", "jsonlines", - # paddleaudio align with librosa==0.8.1, which need numpy==1.23.x - "numpy==1.23.5", - "librosa==0.8.1", + "numpy", + "librosa", determine_scipy_version(), # scipy or scipy>=1.4.0, <=1.12.0 "loguru", determine_matplotlib_version(), # matplotlib or matplotlib<=3.8.4