-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
BytesIO类型时,要保证切到初始位置,这样多次读取才能够正常。比如__call__函数。 #2484
Conversation
__call__函数的参数audio_file为BytesIO类型时执行到self.preprocess(model, audio_file)会报错,需要判断audio_file为BytesIO类型时执行audio_file.seek(0)。
please refer to #2325 to format your code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ZapBird 请再看下 import 的顺序,需要按照字典序排序, |
paddlespeech/cli/asr/infer.py
Outdated
@@ -15,6 +15,7 @@ | |||
import os | |||
import sys | |||
import time | |||
from io import BytesIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import 的位置不对,需要按照官方库、第三方库,字典序 import,否则过不了 CodeStyle 的 CI
麻烦您用 #2325 刷下格式吧 |
@yt605155624 不好意思 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* BytesIO类型时,要保证切到初始位置,这样多次读取才能够正常。比如__call__函数。 __call__函数的参数audio_file为BytesIO类型时执行到self.preprocess(model, audio_file)会报错,需要判断audio_file为BytesIO类型时执行audio_file.seek(0)。
__call__函数的参数audio_file为BytesIO类型时执行到self.preprocess(model, audio_file)会报错,需要判断audio_file为BytesIO类型时执行audio_file.seek(0)。
PR types
PR changes
Describe