model license

This commit is contained in:
游雁 2023-06-06 22:09:42 +08:00
parent 12e1849c6d
commit 787b9d8e7e
3 changed files with 11 additions and 11 deletions

View File

@ -9,7 +9,7 @@ FunASR 模型开源协议
为了保证更好的社区合作,我们制定了以下协议,希望您仔细阅读并遵守本协议。 为了保证更好的社区合作,我们制定了以下协议,希望您仔细阅读并遵守本协议。
1 定义 1 定义
本协议中,[FunASR 软件]指 FunASR 开源模型及其衍生品,包括 Finetune 后的模型;[您]指使用、修改、分享和学习[FunASR 软件]的个人或组织。 本协议中,[FunASR 软件]指 FunASR 开源模型权重及其衍生品,包括 Finetune 后的模型;[您]指使用、修改、分享和学习[FunASR 软件]的个人或组织。
2 许可和限制 2 许可和限制
2.1 许可 2.1 许可
@ -18,7 +18,7 @@ FunASR 模型开源协议
2.2 限制 2.2 限制
您在使用、复制、修改和分享[FunASR 软件]时,必须注明出处以及作者信息。并且,将[FunASR 软件]上传至其他第三方平台以供下载需要获得额外许可可通过官方邮件funasr@list.alibaba-inc.com进行申请免费 您在使用、复制、修改和分享[FunASR 软件]时,必须注明出处以及作者信息,并保留[FunASR 软件]中相关模型名称
3 责任和风险承担 3 责任和风险承担
[FunASR 软件]仅作为参考和学习使用,不对您使用或修改[FunASR 软件]造成的任何直接或间接损失承担任何责任。您对[FunASR 软件]的使用和修改应该自行承担风险。 [FunASR 软件]仅作为参考和学习使用,不对您使用或修改[FunASR 软件]造成的任何直接或间接损失承担任何责任。您对[FunASR 软件]的使用和修改应该自行承担风险。
@ -54,7 +54,7 @@ In this agreement, [FunASR software] refers to the FunASR open source model, and
You are free to use, copy, modify, and share [FunASR software] under the conditions of this agreement. You are free to use, copy, modify, and share [FunASR software] under the conditions of this agreement.
2.2 Restrictions 2.2 Restrictions
You should indicate the code and model source and author information when using, copying, modifying and sharing [FunASR software]. To upload the [FunASR software] to other third-party platforms for download, an additional license is required, which can be applied for free by sending an email to the official email address (funasr@list.alibaba-inc.com). You should indicate the code and model source and author information when using, copying, modifying and sharing [FunASR software]. You should keep the relevant names of models in [FunASR software].
3 Responsibility and Risk 3 Responsibility and Risk
[FunASR software] is for reference and learning purposes only and is not responsible for any direct or indirect losses caused by your use or modification of [FunASR software]. You should take responsibility and risks for your use and modification of [FunASR software]. [FunASR software] is for reference and learning purposes only and is not responsible for any direct or indirect losses caused by your use or modification of [FunASR software]. You should take responsibility and risks for your use and modification of [FunASR software].

View File

@ -1,7 +1,7 @@
# Pretrained Models on ModelScope # Pretrained Models on ModelScope
## Model License ## Model License
You are free to use, copy, modify, and share FunASR models under the conditions of this agreement. You should indicate the model source and author information when using, copying, modifying and sharing FunASR models. To upload the FunASR models to other third-party platforms for download, an additional license is required, which can be applied for free by sending an email to the official email address (funasr@list.alibaba-inc.com). Full model license could see [license](https://github.com/alibaba-damo-academy/FunASR/blob/main/MODEL_LICENSE) You are free to use, copy, modify, and share FunASR models under the conditions of this agreement. You should indicate the model source and author information when using, copying, modifying and sharing FunASR models. You should keep the relevant names of models in [FunASR software].. Full model license could see [license](https://github.com/alibaba-damo-academy/FunASR/blob/main/MODEL_LICENSE)
## Model Zoo ## Model Zoo

View File

@ -95,7 +95,7 @@ async def ws_serve(websocket, path):
websocket.param_dict_punc = {'cache': list()} websocket.param_dict_punc = {'cache': list()}
websocket.vad_pre_idx = 0 websocket.vad_pre_idx = 0
speech_start = False speech_start = False
speech_end_i = False speech_end_i = -1
websocket.wav_name = "microphone" websocket.wav_name = "microphone"
websocket.mode = "2pass" websocket.mode = "2pass"
print("new user connected", flush=True) print("new user connected", flush=True)
@ -124,7 +124,7 @@ async def ws_serve(websocket, path):
# asr online # asr online
frames_asr_online.append(message) frames_asr_online.append(message)
websocket.param_dict_asr_online["is_final"] = speech_end_i websocket.param_dict_asr_online["is_final"] = speech_end_i != -1
if len(frames_asr_online) % websocket.chunk_interval == 0 or websocket.param_dict_asr_online["is_final"]: if len(frames_asr_online) % websocket.chunk_interval == 0 or websocket.param_dict_asr_online["is_final"]:
if websocket.mode == "2pass" or websocket.mode == "online": if websocket.mode == "2pass" or websocket.mode == "online":
audio_in = b"".join(frames_asr_online) audio_in = b"".join(frames_asr_online)
@ -134,14 +134,14 @@ async def ws_serve(websocket, path):
frames_asr.append(message) frames_asr.append(message)
# vad online # vad online
speech_start_i, speech_end_i = await async_vad(websocket, message) speech_start_i, speech_end_i = await async_vad(websocket, message)
if speech_start_i: if speech_start_i != -1:
speech_start = True speech_start = True
beg_bias = (websocket.vad_pre_idx-speech_start_i)//duration_ms beg_bias = (websocket.vad_pre_idx-speech_start_i)//duration_ms
frames_pre = frames[-beg_bias:] frames_pre = frames[-beg_bias:]
frames_asr = [] frames_asr = []
frames_asr.extend(frames_pre) frames_asr.extend(frames_pre)
# asr punc offline # asr punc offline
if speech_end_i or not websocket.is_speaking: if speech_end_i != -1 or not websocket.is_speaking:
# print("vad end point") # print("vad end point")
if websocket.mode == "2pass" or websocket.mode == "offline": if websocket.mode == "2pass" or websocket.mode == "offline":
audio_in = b"".join(frames_asr) audio_in = b"".join(frames_asr)
@ -172,15 +172,15 @@ async def async_vad(websocket, audio_in):
segments_result = inference_pipeline_vad(audio_in=audio_in, param_dict=websocket.param_dict_vad) segments_result = inference_pipeline_vad(audio_in=audio_in, param_dict=websocket.param_dict_vad)
speech_start = False speech_start = -1
speech_end = False speech_end = -1
if len(segments_result) == 0 or len(segments_result["text"]) > 1: if len(segments_result) == 0 or len(segments_result["text"]) > 1:
return speech_start, speech_end return speech_start, speech_end
if segments_result["text"][0][0] != -1: if segments_result["text"][0][0] != -1:
speech_start = segments_result["text"][0][0] speech_start = segments_result["text"][0][0]
if segments_result["text"][0][1] != -1: if segments_result["text"][0][1] != -1:
speech_end = True speech_end = segments_result["text"][0][1]
return speech_start, speech_end return speech_start, speech_end