Skip to content

Commit 8798573

Browse files
authored
[version]add paddlespeech.__version__ (#1166)
* add paddlespeech.__version__ * version 0.1.0 is ready
1 parent 62240bb commit 8798573

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

paddlespeech/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
__version__ = '0.1.0'

paddlespeech/cli/asr/infer.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,12 @@ def __init__(self):
102102
default=None,
103103
help='Checkpoint file of model.')
104104
self.parser.add_argument(
105-
'--yes','-y',
105+
'--yes',
106+
'-y',
106107
action="store_true",
107108
default=False,
108-
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')
109+
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'
110+
)
109111
self.parser.add_argument(
110112
'--device',
111113
type=str,
@@ -379,19 +381,22 @@ def _check(self, audio_file: str, sample_rate: int, force_yes: bool):
379381
If the result does not meet your expectations,\n \
380382
Please input the 16k 16 bit 1 channel wav file. \
381383
".format(self.sample_rate, self.sample_rate))
382-
if force_yes == False:
384+
if force_yes is False:
383385
while (True):
384386
logger.info(
385387
"Whether to change the sample rate and the channel. Y: change the sample. N: exit the prgream."
386388
)
387389
content = input("Input(Y/N):")
388390
if content.strip() == "Y" or content.strip(
389-
) == "y" or content.strip() == "yes" or content.strip() == "Yes":
391+
) == "y" or content.strip() == "yes" or content.strip(
392+
) == "Yes":
390393
logger.info(
391-
"change the sampele rate, channel to 16k and 1 channel")
394+
"change the sampele rate, channel to 16k and 1 channel"
395+
)
392396
break
393397
elif content.strip() == "N" or content.strip(
394-
) == "n" or content.strip() == "no" or content.strip() == "No":
398+
) == "n" or content.strip() == "no" or content.strip(
399+
) == "No":
395400
logger.info("Exit the program")
396401
exit(1)
397402
else:
@@ -418,8 +423,8 @@ def execute(self, argv: List[str]) -> bool:
418423
device = parser_args.device
419424

420425
try:
421-
res = self(audio_file, model, lang, sample_rate, config, ckpt_path, force_yes,
422-
device)
426+
res = self(audio_file, model, lang, sample_rate, config, ckpt_path,
427+
force_yes, device)
423428
logger.info('ASR Result: {}'.format(res))
424429
return True
425430
except Exception as e:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def run(self):
171171
setup_info = dict(
172172
# Metadata
173173
name='paddlespeech',
174-
version='0.1.0rc',
174+
version='0.1.0',
175175
author='PaddlePaddle Speech and Language Team',
176176
author_email='[email protected]',
177177
url='https://github.com/PaddlePaddle/PaddleSpeech',

0 commit comments

Comments
 (0)