internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: PaddlePaddle/PaddleSpeech

Issue:
Update default hyper-params of scorer in python scripts



Discussion:

Resolving patch:
diff --git a/deploy/demo_server.py b/deploy/demo_server.py
--- a/deploy/demo_server.py
+++ b/deploy/demo_server.py
@@ -23,8 +23,8 @@
 add_arg('num_conv_layers',  int,    2,      "# of convolution layers.")
 add_arg('num_rnn_layers',   int,    3,      "# of recurrent layers.")
 add_arg('rnn_layer_size',   int,    2048,   "# of recurrent cells per layer.")
-add_arg('alpha',            float,  2.15,   "Coef of LM for beam search.")
-add_arg('beta',             float,  0.35,   "Coef of WC for beam search.")
+add_arg('alpha',            float,  2.5,   "Coef of LM for beam search.")
+add_arg('beta',             float,  0.3,   "Coef of WC for beam search.")
 add_arg('cutoff_prob',      float,  1.0,    "Cutoff probability for pruning.")
 add_arg('cutoff_top_n',     int,    40,     "Cutoff number for pruning.")
 add_arg('use_gru',          bool,   False,  "Use GRUs instead of simple RNNs.")
diff --git a/infer.py b/infer.py
--- a/infer.py
+++ b/infer.py
@@ -21,8 +21,8 @@
 add_arg('num_conv_layers',  int,    2,      "# of convolution layers.")
 add_arg('num_rnn_layers',   int,    3,      "# of recurrent layers.")
 add_arg('rnn_layer_size',   int,    2048,   "# of recurrent cells per layer.")
-add_arg('alpha',            float,  2.15,   "Coef of LM for beam search.")
-add_arg('beta',             float,  0.35,   "Coef of WC for beam search.")
+add_arg('alpha',            float,  2.5,    "Coef of LM for beam search.")
+add_arg('beta',             float,  0.3,    "Coef of WC for beam search.")
 add_arg('cutoff_prob',      float,  1.0,    "Cutoff probability for pruning.")
 add_arg('cutoff_top_n',     int,    40,     "Cutoff number for pruning.")
 add_arg('use_gru',          bool,   False,  "Use GRUs instead of simple RNNs.")


Test patch:
diff --git a/test.py b/test.py
--- a/test.py
+++ b/test.py
@@ -22,8 +22,8 @@
 add_arg('num_conv_layers',  int,    2,      "# of convolution layers.")
 add_arg('num_rnn_layers',   int,    3,      "# of recurrent layers.")
 add_arg('rnn_layer_size',   int,    2048,   "# of recurrent cells per layer.")
-add_arg('alpha',            float,  2.15,   "Coef of LM for beam search.")
-add_arg('beta',             float,  0.35,   "Coef of WC for beam search.")
+add_arg('alpha',            float,  2.5,    "Coef of LM for beam search.")
+add_arg('beta',             float,  0.3,    "Coef of WC for beam search.")
 add_arg('cutoff_prob',      float,  1.0,    "Cutoff probability for pruning.")
 add_arg('cutoff_top_n',     int,    40,     "Cutoff number for pruning.")
 add_arg('use_gru',          bool,   False,  "Use GRUs instead of simple RNNs.")
Repository: PaddlePaddle/PaddleSpeech

Issue:
DataGenerator.process_utterance does not accept file object
The docstring says filename accepts `basestring` or `file`. But it do not accept `file` actually.
```python
    def process_utterance(self, filename, transcript):
        """Load, augment, featurize and normalize for speech data.

        :param filename: Audio filepath
        :type filename: basestring | file
```


Discussion:

Resolving patch:
diff --git a/data_utils/data.py b/data_utils/data.py
--- a/data_utils/data.py
+++ b/data_utils/data.py
@@ -97,22 +97,22 @@ def __init__(self,
         self._local_data.tar2info = {}
         self._local_data.tar2object = {}
 
-    def process_utterance(self, filename, transcript):
+    def process_utterance(self, audio_file, transcript):
         """Load, augment, featurize and normalize for speech data.
 
-        :param filename: Audio filepath
-        :type filename: basestring | file
+        :param audio_file: Filepath or file object of audio file.
+        :type audio_file: basestring | file
         :param transcript: Transcription text.
         :type transcript: basestring
         :return: Tuple of audio feature tensor and data of transcription part,
                  where transcription part could be token ids or text.
         :rtype: tuple of (2darray, list)
         """
-        if filename.startswith('tar:'):
+        if isinstance(audio_file, basestring) and audio_file.startswith('tar:'):
             speech_segment = SpeechSegment.from_file(
-                self._subfile_from_tar(filename), transcript)
+                self._subfile_from_tar(audio_file), transcript)
         else:
-            speech_segment = SpeechSegment.from_file(filename, transcript)
+            speech_segment = SpeechSegment.from_file(audio_file, transcript)
         self._augmentation_pipeline.transform_audio(speech_segment)
         specgram, transcript_part = self._speech_featurizer.featurize(
             speech_segment, self._keep_transcription_text)


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
server.py里引用路径错误
**Describe the bug**
A clear and concise description of what the bug is.
deepspeech/exps/deepspeech2/bin/deploy/server.py 里面引用的是 from deepspeech.models.deepspeech2 import DeepSpeech2Model，实际应该是 deepspeech.models.ds2，建议更新代码。

**To Reproduce**
Steps to reproduce the behavior:
1.  查看代码  (日期：2021-8-19)
https://github.com/PaddlePaddle/DeepSpeech/blob/develop/deepspeech/exps/deepspeech2/bin/deploy/server.py#L24
引用的是deepspeech2
2. 查看被引用的目录 https://github.com/PaddlePaddle/DeepSpeech/tree/develop/deepspeech/models
子目录只有 ds2

**Expected behavior**
A clear and concise description of what you expected to happen.
server.py的引用应该跟代码一致，其他地方也可能有类似问题。




Discussion:
Thx，我们排查下。

Resolving patch:
diff --git a/deepspeech/exps/deepspeech2/bin/deploy/runtime.py b/deepspeech/exps/deepspeech2/bin/deploy/runtime.py
--- a/deepspeech/exps/deepspeech2/bin/deploy/runtime.py
+++ b/deepspeech/exps/deepspeech2/bin/deploy/runtime.py
@@ -23,7 +23,7 @@
 from deepspeech.exps.deepspeech2.config import get_cfg_defaults
 from deepspeech.io.collator import SpeechCollator
 from deepspeech.io.dataset import ManifestDataset
-from deepspeech.models.deepspeech2 import DeepSpeech2Model
+from deepspeech.models.ds2 import DeepSpeech2Model
 from deepspeech.training.cli import default_argument_parser
 from deepspeech.utils.socket_server import AsrRequestHandler
 from deepspeech.utils.socket_server import AsrTCPServer
diff --git a/deepspeech/exps/deepspeech2/bin/deploy/server.py b/deepspeech/exps/deepspeech2/bin/deploy/server.py
--- a/deepspeech/exps/deepspeech2/bin/deploy/server.py
+++ b/deepspeech/exps/deepspeech2/bin/deploy/server.py
@@ -21,7 +21,7 @@
 from deepspeech.exps.deepspeech2.config import get_cfg_defaults
 from deepspeech.io.collator import SpeechCollator
 from deepspeech.io.dataset import ManifestDataset
-from deepspeech.models.deepspeech2 import DeepSpeech2Model
+from deepspeech.models.ds2 import DeepSpeech2Model
 from deepspeech.training.cli import default_argument_parser
 from deepspeech.utils.socket_server import AsrRequestHandler
 from deepspeech.utils.socket_server import AsrTCPServer
diff --git a/deepspeech/exps/deepspeech2/bin/tune.py b/deepspeech/exps/deepspeech2/bin/tune.py
--- a/deepspeech/exps/deepspeech2/bin/tune.py
+++ b/deepspeech/exps/deepspeech2/bin/tune.py
@@ -21,7 +21,7 @@
 from deepspeech.exps.deepspeech2.config import get_cfg_defaults
 from deepspeech.io.collator import SpeechCollator
 from deepspeech.io.dataset import ManifestDataset
-from deepspeech.models.deepspeech2 import DeepSpeech2Model
+from deepspeech.models.ds2 import DeepSpeech2Model
 from deepspeech.training.cli import default_argument_parser
 from deepspeech.utils import error_rate
 from deepspeech.utils.utility import add_arguments


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
StyleFastSpeech2Inference doesn't support multiple speakers
fastspeech2.py中的StyleFastSpeech2Inference目前只支持单人数据集的变速变调（标贝），是否考虑加入spk_id，以及加一个aishell3的inference的例子呢？


Discussion:
https://github.com/PaddlePaddle/PaddleSpeech/blob/b7f4d8f1529a4e027b829f65979fea8b316e3929/paddlespeech/t2s/models/fastspeech2/fastspeech2.py#L877 参照上面的类加个 spk_id 就成了，有兴趣可以自己先搞一下

Resolving patch:
diff --git a/paddlespeech/t2s/models/fastspeech2/fastspeech2.py b/paddlespeech/t2s/models/fastspeech2/fastspeech2.py
--- a/paddlespeech/t2s/models/fastspeech2/fastspeech2.py
+++ b/paddlespeech/t2s/models/fastspeech2/fastspeech2.py
@@ -907,7 +907,9 @@ def forward(self,
                 energy: Union[paddle.Tensor, np.ndarray]=None,
                 energy_scale: Union[int, float]=None,
                 energy_bias: Union[int, float]=None,
-                robot: bool=False):
+                robot: bool=False,
+                spk_emb=None,
+                spk_id=None):
         """
         Parameters
         ----------
@@ -938,8 +940,9 @@ def forward(self,
         Tensor
             Output sequence of features (L, odim).
         """
+        spk_id = paddle.to_tensor(spk_id)
         normalized_mel, d_outs, p_outs, e_outs = self.acoustic_model.inference(
-            text, durations=None, pitch=None, energy=None)
+            text, durations=None, pitch=None, energy=None, spk_emb=spk_emb, spk_id=spk_id)
         # priority: groundtruth > scale/bias > previous output
         # set durations
         if isinstance(durations, np.ndarray):
@@ -991,7 +994,10 @@ def forward(self,
             durations=durations,
             pitch=pitch,
             energy=energy,
-            use_teacher_forcing=True)
+            use_teacher_forcing=True,
+            spk_emb=spk_emb, 
+            spk_id=spk_id
+            )
 
         logmel = self.normalizer.inverse(normalized_mel)
         return logmel


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
The version between the setup.py and __init__.py is not synchronized.
The version in setup.py is 0.1.1, but the version in __init.py is 0.1.0.


Discussion:

Resolving patch:
diff --git a/paddlespeech/__init__.py b/paddlespeech/__init__.py
--- a/paddlespeech/__init__.py
+++ b/paddlespeech/__init__.py
@@ -12,4 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__version__ = '0.1.0'
+__version__ = '0.1.1'
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,7 @@
 import os
 import subprocess as sp
 import sys
+import paddlespeech
 from pathlib import Path
 
 from setuptools import Command
@@ -172,7 +173,7 @@ def run(self):
 setup_info = dict(
     # Metadata
     name='paddlespeech',
-    version='0.1.1',
+    version=paddlespeech.__version__,
     author='PaddlePaddle Speech and Language Team',
     author_email='paddlesl@baidu.com',
     url='https://github.com/PaddlePaddle/PaddleSpeech',


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
[vec][search] update to paddlespeech model



Discussion:

Resolving patch:
diff --git a/demos/audio_searching/src/config.py b/demos/audio_searching/src/config.py
--- a/demos/audio_searching/src/config.py
+++ b/demos/audio_searching/src/config.py
@@ -16,7 +16,7 @@
 ############### Milvus Configuration ###############
 MILVUS_HOST = os.getenv("MILVUS_HOST", "127.0.0.1")
 MILVUS_PORT = int(os.getenv("MILVUS_PORT", "19530"))
-VECTOR_DIMENSION = int(os.getenv("VECTOR_DIMENSION", "2048"))
+VECTOR_DIMENSION = int(os.getenv("VECTOR_DIMENSION", "192"))
 INDEX_FILE_SIZE = int(os.getenv("INDEX_FILE_SIZE", "1024"))
 METRIC_TYPE = os.getenv("METRIC_TYPE", "L2")
 DEFAULT_TABLE = os.getenv("DEFAULT_TABLE", "audio_table")
diff --git a/demos/audio_searching/src/encode.py b/demos/audio_searching/src/encode.py
--- a/demos/audio_searching/src/encode.py
+++ b/demos/audio_searching/src/encode.py
@@ -15,7 +15,12 @@
 
 import librosa
 import numpy as np
+from config import DEFAULT_TABLE
+
 from logs import LOGGER
+from paddlespeech.cli import VectorExecutor
+
+vector_executor = VectorExecutor()
 
 
 def get_audio_embedding(path):
@@ -23,16 +28,9 @@ def get_audio_embedding(path):
     Use vpr_inference to generate embedding of audio
     """
     try:
-        RESAMPLE_RATE = 16000
-        audio, _ = librosa.load(path, sr=RESAMPLE_RATE, mono=True)
-
-        # TODO add infer/python interface to get embedding, now fake it by rand
-        # vpr = ECAPATDNN(checkpoint_path=None, device='cuda')
-        # embedding = vpr.inference(audio)
-        np.random.seed(hash(os.path.basename(path)) % 1000000)
-        embedding = np.random.rand(1, 2048)
+        embedding = vector_executor(audio_file=path)
         embedding = embedding / np.linalg.norm(embedding)
-        embedding = embedding.tolist()[0]
+        embedding = embedding.tolist()
         return embedding
     except Exception as e:
         LOGGER.error(f"Error with embedding:{e}")


Test patch:
diff --git a/demos/audio_searching/src/test_main.py b/demos/audio_searching/src/test_main.py
--- a/demos/audio_searching/src/test_main.py
+++ b/demos/audio_searching/src/test_main.py
@@ -11,12 +11,12 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-import zipfile
-
-import gdown
 from fastapi.testclient import TestClient
 from main import app
 
+from utils.utility import download
+from utils.utility import unpack
+
 client = TestClient(app)
 
 
@@ -24,11 +24,11 @@ def download_audio_data():
     """
     download audio data
     """
-    url = 'https://drive.google.com/uc?id=1bKu21JWBfcZBuEuzFEvPoAX6PmRrgnUp'
-    gdown.download(url)
-
-    with zipfile.ZipFile('example_audio.zip', 'r') as zip_ref:
-        zip_ref.extractall('./example_audio')
+    url = "https://paddlespeech.bj.bcebos.com/vector/audio/example_audio.tar.gz"
+    md5sum = "52ac69316c1aa1fdef84da7dd2c67b39"
+    target_dir = "./"
+    filepath = download(url, md5sum, target_dir)
+    unpack(filepath, target_dir, True)
 
 
 def test_drop():
Repository: PaddlePaddle/PaddleSpeech

Issue:
[vec][search] update to paddlespeech model



Discussion:

Resolving patch:
diff --git a/demos/audio_searching/src/encode.py b/demos/audio_searching/src/encode.py
--- a/demos/audio_searching/src/encode.py
+++ b/demos/audio_searching/src/encode.py
@@ -12,8 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import numpy as np
-from logs import LOGGER
 
+from logs import LOGGER
 from paddlespeech.cli import VectorExecutor
 
 vector_executor = VectorExecutor()
@@ -24,7 +24,8 @@ def get_audio_embedding(path):
     Use vpr_inference to generate embedding of audio
     """
     try:
-        embedding = vector_executor(audio_file=path)
+        embedding = vector_executor(
+            audio_file=path, model='ecapatdnn_voxceleb12')
         embedding = embedding / np.linalg.norm(embedding)
         embedding = embedding.tolist()
         return embedding


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
[vec] add GRL to domain adaptation



Discussion:

Resolving patch:
diff --git a/paddlespeech/vector/modules/layer.py b/paddlespeech/vector/modules/layer.py
new file mode 100644
--- /dev/null
+++ b/paddlespeech/vector/modules/layer.py
@@ -0,0 +1,76 @@
+# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+import paddle
+import paddle.nn as nn
+from paddle.autograd import PyLayer
+
+
+class GradientReversalFunction(PyLayer):
+    """Gradient Reversal Layer from:
+    Unsupervised Domain Adaptation by Backpropagation (Ganin & Lempitsky, 2015)
+
+    Forward pass is the identity function. In the backward pass,
+    the upstream gradients are multiplied by -lambda (i.e. gradient is reversed)
+    """
+
+    @staticmethod
+    def forward(ctx, x, lambda_=1):
+        """Forward in networks
+        """
+        ctx.save_for_backward(lambda_)
+        return x.clone()
+
+    @staticmethod
+    def backward(ctx, grads):
+        """Backward in networks
+        """
+        lambda_, = ctx.saved_tensor()
+        dx = -lambda_ * grads
+        return dx
+
+
+class GradientReversalLayer(nn.Layer):
+    """Gradient Reversal Layer from:
+    Unsupervised Domain Adaptation by Backpropagation (Ganin & Lempitsky, 2015)
+
+    Forward pass is the identity function. In the backward pass,
+    the upstream gradients are multiplied by -lambda (i.e. gradient is reversed)
+    """
+
+    def __init__(self, lambda_=1):
+        super(GradientReversalLayer, self).__init__()
+        self.lambda_ = lambda_
+
+    def forward(self, x):
+        """Forward in networks
+        """
+        return GradientReversalFunction.apply(x, self.lambda_)
+
+
+if __name__ == "__main__":
+    paddle.set_device("cpu")
+
+    data = paddle.randn([2, 3], dtype="float64")
+    data.stop_gradient = False
+    grl = GradientReversalLayer(1)
+    out = grl(data)
+    out.mean().backward()
+    print(data.grad)
+
+    data = paddle.randn([2, 3], dtype="float64")
+    data.stop_gradient = False
+    grl = GradientReversalLayer(-1)
+    out = grl(data)
+    out.mean().backward()
+    print(data.grad)


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
切换英文语音合成报错 get_input_ids() got an unexpected keyword argument 'get_tone_ids'
要切换成英文语音合成时，更改了/paddlespeech/server/conf/application.yaml这个配置文件中的tts_python里面的声学模型和声码器，声学模型用的是fastspeech2_ljspeech，声码器用的pwgan_ljspeech，并且lang改为en，但是报错 get_input_ids() got an unexpected keyword argument 'get_tone_ids'


Discussion:

Resolving patch:
diff --git a/paddlespeech/server/engine/engine_warmup.py b/paddlespeech/server/engine/engine_warmup.py
--- a/paddlespeech/server/engine/engine_warmup.py
+++ b/paddlespeech/server/engine/engine_warmup.py
@@ -60,7 +60,10 @@ def warm_up(engine_and_type: str, warm_up_time: int=3) -> bool:
 
                 else:
                     st = time.time()
-                    connection_handler.infer(text=sentence)
+                    connection_handler.infer(
+                        text=sentence,
+                        lang=tts_engine.lang,
+                        am=tts_engine.config.am)
                     et = time.time()
                     logger.debug(
                         f"The response time of the {i} warm up: {et - st} s")


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
Added pre-install doc for G2P and TN modules and updated the dependency version of pypinyin
Added pre-install doc for G2P and TN modules and updated the dependency version of pypinyin


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -52,7 +52,7 @@
     "Pillow>=9.0.0",
     "praatio==5.0.0",
     "protobuf>=3.1.0, <=3.20.0",
-    "pypinyin",
+    "pypinyin<=0.44.0",
     "pypinyin-dict",
     "python-dateutil",
     "pyworld==0.2.12",


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
[S2T] ASR : 多卡训练aishell数据报错：'RelPositionMultiHeadedAttention' object has no attribute 'weight'
**具体报错信息如下：**
![image](https://user-images.githubusercontent.com/27938135/196336381-7bf0fb1e-5d0d-4997-bbd9-0d0a30888a7b.png)
![image](https://user-images.githubusercontent.com/27938135/196336418-203250ed-299d-4650-9ec4-b458e67edfb8.png)
**我的paddle版本是这个：**
![image](https://user-images.githubusercontent.com/27938135/196336457-4ee1ebb1-6ed0-4117-80f7-410d0b67ec4b.png)
**请问这个报错是什么情况？**


Discussion:
我们在check这个问题。

Resolving patch:
diff --git a/paddlespeech/s2t/modules/attention.py b/paddlespeech/s2t/modules/attention.py
--- a/paddlespeech/s2t/modules/attention.py
+++ b/paddlespeech/s2t/modules/attention.py
@@ -19,7 +19,6 @@
 
 import paddle
 from paddle import nn
-from paddle.nn import functional as F
 from paddle.nn import initializer as I
 
 from paddlespeech.s2t.modules.align import Linear
@@ -56,16 +55,6 @@ def __init__(self, n_head: int, n_feat: int, dropout_rate: float):
         self.linear_out = Linear(n_feat, n_feat)
         self.dropout = nn.Dropout(p=dropout_rate)
 
-    def _build_once(self, *args, **kwargs):
-        super()._build_once(*args, **kwargs)
-        # if self.self_att:
-        # self.linear_kv = Linear(self.n_feat, self.n_feat*2)
-        if not self.training:
-            self.weight = paddle.concat(
-                [self.linear_k.weight, self.linear_v.weight], axis=-1)
-            self.bias = paddle.concat([self.linear_k.bias, self.linear_v.bias])
-        self._built = True
-
     def forward_qkv(self,
                     query: paddle.Tensor,
                     key: paddle.Tensor,
@@ -87,13 +76,8 @@ def forward_qkv(self,
         n_batch = query.shape[0]
 
         q = self.linear_q(query).view(n_batch, -1, self.h, self.d_k)
-        if self.training:
-            k = self.linear_k(key).view(n_batch, -1, self.h, self.d_k)
-            v = self.linear_v(value).view(n_batch, -1, self.h, self.d_k)
-        else:
-            k, v = F.linear(key, self.weight, self.bias).view(
-                n_batch, -1, 2 * self.h, self.d_k).split(
-                    2, axis=2)
+        k = self.linear_k(key).view(n_batch, -1, self.h, self.d_k)
+        v = self.linear_v(value).view(n_batch, -1, self.h, self.d_k)
 
         q = q.transpose([0, 2, 1, 3])  # (batch, head, time1, d_k)
         k = k.transpose([0, 2, 1, 3])  # (batch, head, time2, d_k)


Test patch:
Repository: PaddlePaddle/PaddleSpeech

Issue:
[S2T] Whisper transcription cannot choose languages
For support and discussions, please use our [Discourse forums](https://github.com/PaddlePaddle/DeepSpeech/discussions).

If you've found a bug then please create an issue with the following information:

**Describe the bug**

Even if users specify a language, program will still detect language by itself.

**To Reproduce**

```py
import paddle
from paddlespeech.cli.whisper import WhisperExecutor

audio_file = 'path/to/test.wav' 
whisper_executor = WhisperExecutor()
result = whisper_executor(
    model='whisper',
    task='transcribe',
    size='tiny',
    sample_rate=16000,
    config=None,  # Set `config` and `ckpt_path` to None to use pretrained model.
    ckpt_path=None,
    audio_file=audio_file,
    language='fr',
    device=paddle.get_device())
```

**Screenshots**

![image](https://user-images.githubusercontent.com/8279655/211976128-6bd4d272-4189-4a37-bbf6-08c23c090947.png)






Discussion:

Resolving patch:
diff --git a/paddlespeech/s2t/models/whisper/whipser.py b/paddlespeech/s2t/models/whisper/whipser.py
--- a/paddlespeech/s2t/models/whisper/whipser.py
+++ b/paddlespeech/s2t/models/whisper/whipser.py
@@ -476,7 +476,7 @@ def transcribe(
         decode_options["fp16"] = False
 
     if decode_options.get(
-            "language", 'None') or decode_options.get("language", None) is None:
+            "language") == 'None' or decode_options.get("language", None) is None:
         if not model.is_multilingual:
             decode_options["language"] = "en"
         else:


Test patch: