[version]add paddlespeech.__version__ (#1166)

* add paddlespeech.__version__

* version 0.1.0 is ready
pull/1167/head
Jackwaterveg 4 years ago committed by GitHub
parent 62240bbf68
commit 879857332d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,3 +11,5 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
__version__ = '0.1.0'

@ -102,10 +102,12 @@ class ASRExecutor(BaseExecutor):
default=None, default=None,
help='Checkpoint file of model.') help='Checkpoint file of model.')
self.parser.add_argument( self.parser.add_argument(
'--yes','-y', '--yes',
'-y',
action="store_true", action="store_true",
default=False, 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( self.parser.add_argument(
'--device', '--device',
type=str, type=str,
@ -379,19 +381,22 @@ class ASRExecutor(BaseExecutor):
If the result does not meet your expectations\n \ If the result does not meet your expectations\n \
Please input the 16k 16 bit 1 channel wav file. \ Please input the 16k 16 bit 1 channel wav file. \
".format(self.sample_rate, self.sample_rate)) ".format(self.sample_rate, self.sample_rate))
if force_yes == False: if force_yes is False:
while (True): while (True):
logger.info( logger.info(
"Whether to change the sample rate and the channel. Y: change the sample. N: exit the prgream." "Whether to change the sample rate and the channel. Y: change the sample. N: exit the prgream."
) )
content = input("Input(Y/N):") content = input("Input(Y/N):")
if content.strip() == "Y" or content.strip( 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( logger.info(
"change the sampele rate, channel to 16k and 1 channel") "change the sampele rate, channel to 16k and 1 channel"
)
break break
elif content.strip() == "N" or content.strip( 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") logger.info("Exit the program")
exit(1) exit(1)
else: else:
@ -418,8 +423,8 @@ class ASRExecutor(BaseExecutor):
device = parser_args.device device = parser_args.device
try: try:
res = self(audio_file, model, lang, sample_rate, config, ckpt_path, force_yes, res = self(audio_file, model, lang, sample_rate, config, ckpt_path,
device) force_yes, device)
logger.info('ASR Result: {}'.format(res)) logger.info('ASR Result: {}'.format(res))
return True return True
except Exception as e: except Exception as e:

@ -171,7 +171,7 @@ class UploadCommand(Command):
setup_info = dict( setup_info = dict(
# Metadata # Metadata
name='paddlespeech', name='paddlespeech',
version='0.1.0rc', version='0.1.0',
author='PaddlePaddle Speech and Language Team', author='PaddlePaddle Speech and Language Team',
author_email='paddlesl@baidu.com', author_email='paddlesl@baidu.com',
url='https://github.com/PaddlePaddle/PaddleSpeech', url='https://github.com/PaddlePaddle/PaddleSpeech',

Loading…
Cancel
Save