diff --git a/paddlespeech/__init__.py b/paddlespeech/__init__.py index 185a92b8d..8d32f2879 100644 --- a/paddlespeech/__init__.py +++ b/paddlespeech/__init__.py @@ -11,3 +11,5 @@ # 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. + +__version__ = '0.1.0' diff --git a/paddlespeech/cli/asr/infer.py b/paddlespeech/cli/asr/infer.py index db659a881..05fcc20a2 100644 --- a/paddlespeech/cli/asr/infer.py +++ b/paddlespeech/cli/asr/infer.py @@ -102,10 +102,12 @@ class ASRExecutor(BaseExecutor): default=None, help='Checkpoint file of model.') self.parser.add_argument( - '--yes','-y', + '--yes', + '-y', action="store_true", default=False, - help='No additional parameters required. Once set this parameter, it means accepting the request of the program by default, which includes transforming the audio sample rate') + help='No additional parameters required. Once set this parameter, it means accepting the request of the program by default, which includes transforming the audio sample rate' + ) self.parser.add_argument( '--device', type=str, @@ -379,19 +381,22 @@ class ASRExecutor(BaseExecutor): If the result does not meet your expectations,\n \ Please input the 16k 16 bit 1 channel wav file. \ ".format(self.sample_rate, self.sample_rate)) - if force_yes == False: + if force_yes is False: while (True): logger.info( "Whether to change the sample rate and the channel. Y: change the sample. N: exit the prgream." ) content = input("Input(Y/N):") if content.strip() == "Y" or content.strip( - ) == "y" or content.strip() == "yes" or content.strip() == "Yes": + ) == "y" or content.strip() == "yes" or content.strip( + ) == "Yes": logger.info( - "change the sampele rate, channel to 16k and 1 channel") + "change the sampele rate, channel to 16k and 1 channel" + ) break elif content.strip() == "N" or content.strip( - ) == "n" or content.strip() == "no" or content.strip() == "No": + ) == "n" or content.strip() == "no" or content.strip( + ) == "No": logger.info("Exit the program") exit(1) else: @@ -418,8 +423,8 @@ class ASRExecutor(BaseExecutor): device = parser_args.device try: - res = self(audio_file, model, lang, sample_rate, config, ckpt_path, force_yes, - device) + res = self(audio_file, model, lang, sample_rate, config, ckpt_path, + force_yes, device) logger.info('ASR Result: {}'.format(res)) return True except Exception as e: diff --git a/setup.py b/setup.py index 38ce0c05a..73f392c6c 100644 --- a/setup.py +++ b/setup.py @@ -171,7 +171,7 @@ class UploadCommand(Command): setup_info = dict( # Metadata name='paddlespeech', - version='0.1.0rc', + version='0.1.0', author='PaddlePaddle Speech and Language Team', author_email='paddlesl@baidu.com', url='https://github.com/PaddlePaddle/PaddleSpeech',