Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[S2T]使用Python API进行语音转文字的时候,发现会连接外部网站 #3613

Open
mzgcz opened this issue Nov 24, 2023 · 3 comments
Assignees
Labels

Comments

@mzgcz
Copy link

mzgcz commented Nov 24, 2023

执行以下代码时,会连接http://paddlepaddle.org.cn/paddlehub/stat,即便在本地已存在模型的情况下也是如此

asr_executor(model='conformer_u2pp_online_wenetspeech',
                           lang='zh',
                           sample_rate=16000,
                           config=None,
                           ckpt_path=None,
                           audio_file=fname)
@zxcd
Copy link
Collaborator

zxcd commented Jan 2, 2024

你是如何运行的?

@zxcd zxcd assigned zxcd and unassigned zh794390558 Jan 2, 2024
@mzgcz
Copy link
Author

mzgcz commented Jan 9, 2024

你是如何运行的?

调用如下:

import logging
logging.basicConfig(level=logging.DEBUG)

g_asr = ASRExecutor()
result = g_asr(audio_file=fname)

日志信息如下:

DEBUG:urllib3.connectionpool:"GET http://paddlepaddle.org.cn/paddlehub/stat?task=asr&version=0.0.0&from=ppspeech&model=conformer_u2pp_online_wenetspeech&extra=%7B%22paddle_version%22%3A+%222.5.2%22%2C+%22lang%22%3A+%22zh%22%2C+%22inp_sr%22%3A+16000%2C+%22model_sr%22%3A+16000%2C+%22cache_info%22%3A+%2276c0c892202df4606c2f076ee9640be8-1700717765%22%7D HTTP/1.1" 301 186
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): paddlepaddle.org.cn:443

@fancyerii
Copy link

paddlespeech会在后台线程悄咪咪上传调用信息,打开site-packages/paddlespeech/cli/utils.py,把stats_wrapper上传日志的代码注释掉。

def stats_wrapper(executor_func):
    def _warpper(self, *args, **kwargs):
        # try:
        #     _note_one_stat(
        #         type(self).__name__, _parse_args(executor_func, *args,
        #                                          **kwargs))
        # except Exception:
        #     pass
        return executor_func(self, *args, **kwargs)

    return _warpper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants