Merge branch 'vad'
Browse files* vad:
[fix]: readme.
[fix]: add.
[feature]: remove experimental models.
[fix]: web bugfix.
update prompt for en
[feature]: add session history.
restore min_silence_duration_ms to 100
add hotwords config to mapping
add hotwords
add hotwords config to mapping
add hotwords
update vad threshold
remove english words, add more Chinese hotwords
rename processing pipe
rename filenames
- README.md +1 -0
- config/hotwords.json +54 -1
- config/hotwords.txt +77 -35
- config/keywords.txt +1 -2
- config/prompt.py +2 -2
- config/settings.py +1 -1
- frontend/assets/{index-f4166384.css → index-b1f15c01.css} +1 -1
- frontend/assets/{index-a389e3a7.js → index-fc3a0f87.js} +0 -0
- frontend/index.html +2 -2
- main.py +2 -2
- moyoyo_asr_models/ggml-medium-encoder.mlmodelc/analytics/coremldata.bin +0 -3
- moyoyo_asr_models/ggml-medium-encoder.mlmodelc/coremldata.bin +0 -3
- moyoyo_asr_models/ggml-medium-encoder.mlmodelc/metadata.json +0 -64
- moyoyo_asr_models/ggml-medium-encoder.mlmodelc/model.mil +0 -0
- moyoyo_asr_models/ggml-medium-encoder.mlmodelc/weights/weight.bin +0 -3
- moyoyo_asr_models/ggml-medium-q5_0.bin +0 -3
- moyoyo_asr_models/ggml-small-encoder.mlmodelc/analytics/coremldata.bin +0 -3
- moyoyo_asr_models/ggml-small-encoder.mlmodelc/coremldata.bin +0 -3
- moyoyo_asr_models/ggml-small-encoder.mlmodelc/metadata.json +0 -64
- moyoyo_asr_models/ggml-small-encoder.mlmodelc/model.mil +0 -0
- moyoyo_asr_models/ggml-small-encoder.mlmodelc/weights/weight.bin +0 -3
- moyoyo_asr_models/ggml-small.bin +0 -3
- moyoyo_asr_models/qwen2.5-7b-instruct-q5_0-00001-of-00002.gguf +0 -3
- moyoyo_asr_models/qwen2.5-7b-instruct-q5_0-00002-of-00002.gguf +0 -3
- transcribe/helpers/vadprocessor.py +0 -1
- transcribe/{translatepipes.py → processing.py} +1 -1
- transcribe/serve.py +3 -4
README.md
CHANGED
|
@@ -84,3 +84,4 @@ license: mit
|
|
| 84 |
## 运行
|
| 85 |
> 1. 运行命令 `python main.py` 启动应用程序。
|
| 86 |
> 2. 打开浏览器并访问 `http://localhost:9191/` 以使用该应用。
|
|
|
|
|
|
| 84 |
## 运行
|
| 85 |
> 1. 运行命令 `python main.py` 启动应用程序。
|
| 86 |
> 2. 打开浏览器并访问 `http://localhost:9191/` 以使用该应用。
|
| 87 |
+
> 3. 推荐是用 Chrome 浏览器,Safari/Firefox 可能会出现一些问题。
|
config/hotwords.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
| 6 |
"go same": "GOSIM",
|
| 7 |
"GoSync": "GOSIM",
|
| 8 |
"Go Son": "GOSIM",
|
|
|
|
| 9 |
"CSN": "CSDN",
|
| 10 |
"CSDF": "CSDN",
|
| 11 |
"CSTN": "CSDN",
|
|
@@ -20,8 +21,60 @@
|
|
| 20 |
"它跟face": "huggingface",
|
| 21 |
"拉么index": "LlamaIndex",
|
| 22 |
"lama index": "LlamaIndex",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
"rug": "RAG",
|
| 24 |
"defive": "Dify",
|
| 25 |
"define": "Dify",
|
| 26 |
-
"open minus":"open manus"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
}
|
|
|
|
| 6 |
"go same": "GOSIM",
|
| 7 |
"GoSync": "GOSIM",
|
| 8 |
"Go Son": "GOSIM",
|
| 9 |
+
"GOSIMe": "GOSIM",
|
| 10 |
"CSN": "CSDN",
|
| 11 |
"CSDF": "CSDN",
|
| 12 |
"CSTN": "CSDN",
|
|
|
|
| 21 |
"它跟face": "huggingface",
|
| 22 |
"拉么index": "LlamaIndex",
|
| 23 |
"lama index": "LlamaIndex",
|
| 24 |
+
"feature为": "futurewei",
|
| 25 |
+
"future为": "futurewei",
|
| 26 |
+
"future维": "futurewei",
|
| 27 |
+
"feature维": "futurewei",
|
| 28 |
"rug": "RAG",
|
| 29 |
"defive": "Dify",
|
| 30 |
"define": "Dify",
|
| 31 |
+
"open minus":"open manus",
|
| 32 |
+
"Open minus":"open manus",
|
| 33 |
+
"美塔GPT": "metagpt",
|
| 34 |
+
"Open manners": "open manus",
|
| 35 |
+
"Deep wisdom":"DeepWisdom",
|
| 36 |
+
"meta GPT": "MetaGPT",
|
| 37 |
+
"rag flu": "RAGFlow",
|
| 38 |
+
"rug flu": "RAGFlow",
|
| 39 |
+
"RAG flow": "RAGFlow",
|
| 40 |
+
"RAG floor": "RAGFlow",
|
| 41 |
+
"rig floor": "RAGFlow",
|
| 42 |
+
"rik flow": "RAGFlow",
|
| 43 |
+
"Rik flow": "RAGFlow",
|
| 44 |
+
"Raj flow": "RAGFlow",
|
| 45 |
+
"Read flow": "RAGFlow",
|
| 46 |
+
"二AJ flow": "RAGFlow",
|
| 47 |
+
"Rig flow": "RAGFlow",
|
| 48 |
+
"Rig": "RAG",
|
| 49 |
+
"二AG flow": "RAGFlow",
|
| 50 |
+
"Rick flow": "RAGFlow",
|
| 51 |
+
"ick flow": "RAGFlow",
|
| 52 |
+
"二AJ": "RAG",
|
| 53 |
+
"rig": "RAG",
|
| 54 |
+
"美他GBT": "MetaGPT",
|
| 55 |
+
"没他GPT": "MetaGPT",
|
| 56 |
+
"GBT": "GPT",
|
| 57 |
+
"美他": "Meta",
|
| 58 |
+
"英飞流": "InfinFlow",
|
| 59 |
+
"H一百": "H100",
|
| 60 |
+
"v一百": "V100",
|
| 61 |
+
"h两百": "H200",
|
| 62 |
+
"H两百": "H200",
|
| 63 |
+
"隐扣的": "encoder",
|
| 64 |
+
"抵扣的": "decoder",
|
| 65 |
+
"耳机": "RAG",
|
| 66 |
+
"头坑": "token",
|
| 67 |
+
"麦TGPT": "MetaGPT",
|
| 68 |
+
"三点四b": "3.4b",
|
| 69 |
+
"七b": "7b",
|
| 70 |
+
"可拍了的": "Copilot",
|
| 71 |
+
"spore": "score",
|
| 72 |
+
"KV cash": "KV cache",
|
| 73 |
+
"拉玛": "Llama",
|
| 74 |
+
"拉玛三": "Llama3",
|
| 75 |
+
"拉玛三二": "Llama3.2",
|
| 76 |
+
"拉玛三二七零": "Llama3.2-70b",
|
| 77 |
+
"拉玛三二七零b": "Llama3.2-70b",
|
| 78 |
+
"follow三十二": "fp32"
|
| 79 |
+
|
| 80 |
}
|
config/hotwords.txt
CHANGED
|
@@ -1,37 +1,79 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
Futurewei
|
| 8 |
-
Cloud
|
| 9 |
-
OpenAI
|
| 10 |
-
PYTHON
|
| 11 |
千问
|
| 12 |
鸿蒙
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
阿里
|
| 2 |
+
通义实验室
|
| 3 |
+
通义灵码
|
| 4 |
+
通义晓蜜
|
| 5 |
+
通义听悟
|
| 6 |
+
通义星尘
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
千问
|
| 8 |
鸿蒙
|
| 9 |
+
范式
|
| 10 |
+
泛化
|
| 11 |
+
用例
|
| 12 |
+
模型
|
| 13 |
+
预训练
|
| 14 |
+
无监督
|
| 15 |
+
先验
|
| 16 |
+
注意力
|
| 17 |
+
编程
|
| 18 |
+
订阅
|
| 19 |
+
智能体
|
| 20 |
+
头数
|
| 21 |
+
基座模型
|
| 22 |
+
激活值
|
| 23 |
+
隐藏层
|
| 24 |
+
注意力头数
|
| 25 |
+
开源
|
| 26 |
+
微调
|
| 27 |
+
指令微调
|
| 28 |
+
具身智能
|
| 29 |
+
声学建模
|
| 30 |
+
边缘计算
|
| 31 |
+
昇腾
|
| 32 |
+
训推
|
| 33 |
+
强化学习
|
| 34 |
+
近端策略优化
|
| 35 |
+
奖励建模
|
| 36 |
+
分词
|
| 37 |
+
幻觉
|
| 38 |
+
代码补全
|
| 39 |
+
代码生成
|
| 40 |
+
上下文感知
|
| 41 |
+
上下文学习
|
| 42 |
+
任务分解
|
| 43 |
+
需求理解
|
| 44 |
+
自然语言处理
|
| 45 |
+
检索增强生成
|
| 46 |
+
多模态
|
| 47 |
+
拉玛
|
| 48 |
+
美他
|
| 49 |
+
英飞流
|
| 50 |
+
向量
|
| 51 |
+
稀疏向量
|
| 52 |
+
张量
|
| 53 |
+
稠密
|
| 54 |
+
海涵
|
| 55 |
+
重构
|
| 56 |
+
语义
|
| 57 |
+
语义鸿沟
|
| 58 |
+
隐扣的
|
| 59 |
+
抵扣的
|
| 60 |
+
索引
|
| 61 |
+
次级索引
|
| 62 |
+
融合
|
| 63 |
+
召回
|
| 64 |
+
复现
|
| 65 |
+
知识图谱
|
| 66 |
+
源
|
| 67 |
+
图数据库
|
| 68 |
+
图搜索
|
| 69 |
+
命名体
|
| 70 |
+
补全
|
| 71 |
+
数量级
|
| 72 |
+
耳机
|
| 73 |
+
头坑
|
| 74 |
+
工程
|
| 75 |
+
多语言
|
| 76 |
+
词袋
|
| 77 |
+
可拍了的
|
| 78 |
+
转置
|
| 79 |
+
八比特
|
config/keywords.txt
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
OpenAGI
|
| 2 |
LLaMA Factory
|
| 3 |
-
OPENGL
|
| 4 |
-
Web3
|
|
|
|
| 1 |
OpenAGI
|
| 2 |
LLaMA Factory
|
| 3 |
+
OPENGL
|
|
|
config/prompt.py
CHANGED
|
@@ -19,11 +19,11 @@ keywords_list = [i.strip() for i in (CONFIG_DIR / 'keywords.txt').read_text().sp
|
|
| 19 |
keywords_mapping_string = '\n'.join([f' * {value}: {value}' for value in keywords_list ])
|
| 20 |
|
| 21 |
LLM_SYS_7B_PROMPT_EN= """
|
| 22 |
-
你是一名专业的同声传译员,正在为 GOSIM
|
| 23 |
|
| 24 |
请遵循以下要求:
|
| 25 |
1. 语言风格:翻译成中文时,请使用自然、流畅、符合现代汉语口语习惯的表达方式。避免生硬、逐字翻译的痕迹,要让听众容易理解。
|
| 26 |
-
2. 专业术语:**请优先参考下方提供的术语对照表进行翻译。**
|
| 27 |
3. 专有名词:对于专有名词,如会议名称 "GOSIM"、人名、公司名、项目名、特定技术名称等,请保留其原始英文不做翻译。
|
| 28 |
4. 流畅性与准确性:在追求口语化的同时,务必保证信息传达的准确性。
|
| 29 |
5. 输出:请直接输出翻译结果,不要添加任何额外的解释或说明。
|
|
|
|
| 19 |
keywords_mapping_string = '\n'.join([f' * {value}: {value}' for value in keywords_list ])
|
| 20 |
|
| 21 |
LLM_SYS_7B_PROMPT_EN= """
|
| 22 |
+
你是一名专业的同声传译员,正在为 GOSIM 会议提供英中翻译服务。你的任务是准确、流畅地翻译发言内容。
|
| 23 |
|
| 24 |
请遵循以下要求:
|
| 25 |
1. 语言风格:翻译成中文时,请使用自然、流畅、符合现代汉语口语习惯的表达方式。避免生硬、逐字翻译的痕迹,要让听众容易理解。
|
| 26 |
+
2. 专业术语:**请优先参考下方提供的术语对照表进行翻译。** 对于对照表中未包含的术语,如果该术语有公认的标准翻译,请使用标准翻译;如果没有或不确定,请保留英文原文。不要用通俗词汇替代专业术语。
|
| 27 |
3. 专有名词:对于专有名词,如会议名称 "GOSIM"、人名、公司名、项目名、特定技术名称等,请保留其原始英文不做翻译。
|
| 28 |
4. 流畅性与准确性:在追求口语化的同时,务必保证信息传达的准确性。
|
| 29 |
5. 输出:请直接输出翻译结果,不要添加任何额外的解释或说明。
|
config/settings.py
CHANGED
|
@@ -23,7 +23,7 @@ console_handler.setFormatter(console_formatter)
|
|
| 23 |
logging.getLogger().addHandler(console_handler)
|
| 24 |
|
| 25 |
# 音频段的决策时间
|
| 26 |
-
FRAME_SCOPE_TIME_THRESHOLD =
|
| 27 |
# 最长语音时长
|
| 28 |
MAX_SPEECH_DURATION_S = 15
|
| 29 |
|
|
|
|
| 23 |
logging.getLogger().addHandler(console_handler)
|
| 24 |
|
| 25 |
# 音频段的决策时间
|
| 26 |
+
FRAME_SCOPE_TIME_THRESHOLD = 6
|
| 27 |
# 最长语音时长
|
| 28 |
MAX_SPEECH_DURATION_S = 15
|
| 29 |
|
frontend/assets/{index-f4166384.css → index-b1f15c01.css}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;height:auto;min-height:auto;color:#333;background:#fff}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}.card{border-bottom:solid 2px lightgray;align-items:center;justify-content:center;margin-top:40px;display:flex;max-width:1024px;width:100%}.seg-title{margin:24px 0;font-size:20px;font-weight:500}.seg-co{width:1022px;text-align:left;border-left:solid 6px midnightblue;padding-left:8px;margin-left:2px;margin-top:36px;line-height:24px}#app{margin:0 auto;padding:0;text-align:center;width:100%}.ant-btn{padding:4px 12px}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.ant-card{background:#f5f6fa}.ant-card .ant-card-actions{background-color:#e8e8f8cc!important}.ant-popover{max-width:800px!important}.ant-form-item{background:transparent;margin-bottom:40px!important}.ant-form-item .ant-form-item-explain-error{color:#ff4d4f;text-align:left!important}.ant-form-item-label label{font-size:18px!important;color:#1a1a1a!important;font-weight:500!important}.ant-tooltip{max-width:1022px!important}.ant-page-header-heading{width:1022px!important}.highlight{background:ghostwhite}.content[data-v-
|
|
|
|
| 1 |
+
html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;height:auto;min-height:auto;color:#333;background:#fff}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}.card{border-bottom:solid 2px lightgray;align-items:center;justify-content:center;margin-top:40px;display:flex;max-width:1024px;width:100%}.seg-title{margin:24px 0;font-size:20px;font-weight:500}.seg-co{width:1022px;text-align:left;border-left:solid 6px midnightblue;padding-left:8px;margin-left:2px;margin-top:36px;line-height:24px}#app{margin:0 auto;padding:0;text-align:center;width:100%}.ant-btn{padding:4px 12px}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.ant-card{background:#f5f6fa}.ant-card .ant-card-actions{background-color:#e8e8f8cc!important}.ant-popover{max-width:800px!important}.ant-form-item{background:transparent;margin-bottom:40px!important}.ant-form-item .ant-form-item-explain-error{color:#ff4d4f;text-align:left!important}.ant-form-item-label label{font-size:18px!important;color:#1a1a1a!important;font-weight:500!important}.ant-tooltip{max-width:1022px!important}.ant-page-header-heading{width:1022px!important}.highlight{background:ghostwhite}.content[data-v-66032ad7]{background-color:#fff;max-width:1280px;min-height:720px;margin:0 auto;display:flex;flex-direction:column;align-items:center;justify-content:space-between}.not-found-wrapper[data-v-aef52a59]{height:calc(100vh - 104px)}.config-content[data-v-3a741d94]{width:420px;margin:12px}.config-content .config-block[data-v-3a741d94]{margin:12px;padding-bottom:12px}.sessions[data-v-3a741d94]{width:100%;height:100%;min-height:50vh;max-height:80vh;overflow-y:scroll;margin-top:24px;display:flex;flex-direction:column;justify-content:flex-start}.sessions .session-node[data-v-3a741d94]{width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:12px;margin-bottom:12px;background-color:#f0f1f7;border-radius:4px}.sessions .session-node .content[data-v-3a741d94]{display:flex;flex-direction:column;justify-content:center;align-items:self-start}.sessions .session-node .content .content-title[data-v-3a741d94]{font-size:18px;font-weight:700;color:#2e2f33}.sessions .session-node .content .content-text[data-v-3a741d94]{font-size:18px;font-weight:500;color:#2e2f33}.sessions .session-node .content .content-outline[data-v-3a741d94]{width:100%}.sessions .session-node .content .content-outline .outline-line[data-v-3a741d94]{font-size:16px;font-weight:500;color:#909299;margin:8px 0 4px}.sessions .session-node .session-action[data-v-3a741d94]{width:96px;display:flex;justify-content:space-around;align-items:center}.sessions .session-node .session-action .ant-btn-primary[data-v-3a741d94]{background-color:#1890ff!important;border-color:#1890ff!important}.view-wrapper[data-v-3a741d94]{width:100%;height:100%;background-color:#fff}.view-wrapper .wrapper-width-fixed[data-v-3a741d94]{width:1280px}.view-wrapper .wrapper-width-auto[data-v-3a741d94]{width:100vw}.view-wrapper .content-wrapper[data-v-3a741d94]{text-align:left;max-width:100vw;min-width:320px;margin-bottom:64px;min-height:calc(100vh - 438px)}.view-wrapper .content-wrapper .chat-box[data-v-3a741d94]{width:100%;height:54vh;border-radius:4px;padding:12px;color:#2e2f33;font-size:18px}.view-wrapper .content-wrapper .chat-box-placeholder[data-v-3a741d94]{width:100%;height:58vh;border-radius:4px;padding:12px;font-size:18px;color:#a4a6ac}.view-wrapper .content-wrapper .actions-box[data-v-3a741d94]{display:flex;align-items:center;justify-content:space-between;margin:0 24px;height:48px}.view-wrapper .content-wrapper .actions-box .left-actions[data-v-3a741d94]{display:flex;align-items:center;justify-content:space-between;width:332px}.view-wrapper .content-wrapper .actions-box .right-actions[data-v-3a741d94]{display:flex;align-items:center;justify-content:space-between;width:108px}.view-wrapper .content-wrapper .trans-list[data-v-3a741d94]{overflow-y:auto;width:100%;height:58vh;scrollbar-width:none;-ms-overflow-style:none}.view-wrapper .content-wrapper .trans-list[data-v-3a741d94]::-webkit-scrollbar{display:none}.view-wrapper .content-wrapper .trans-list .node[data-v-3a741d94]{margin-bottom:36px;width:100%!important;transition:all .3s ease}.view-wrapper .content-wrapper .trans-list .node .trans-time[data-v-3a741d94]{font-size:14px;color:#c4c6cc}.view-wrapper .content-wrapper .trans-list .node .trans-font-size-16[data-v-3a741d94]{font-size:16px}.view-wrapper .content-wrapper .trans-list .node .trans-font-size-18[data-v-3a741d94]{font-size:18px}.view-wrapper .content-wrapper .trans-list .node .trans-font-size-20[data-v-3a741d94]{font-size:20px}.view-wrapper .content-wrapper .trans-list .node .trans-font-size-22[data-v-3a741d94]{font-size:22px}.view-wrapper .content-wrapper .trans-list .node .trans-font-size-24[data-v-3a741d94]{font-size:24px}.view-wrapper .content-wrapper .trans-list .node .trans-src-lang[data-v-3a741d94]{color:#909299;font-weight:500}.view-wrapper .content-wrapper .trans-list .node .trans-dst-lang[data-v-3a741d94]{color:#2e2f33;font-weight:600}.view-wrapper .content-wrapper .trans-list .current_node[data-v-3a741d94]{background-color:#f0f1f7;padding:4px 8px}@keyframes highlight-3a741d94{0%{background-color:transparent}50%{background-color:#fff1ce80}to{background-color:transparent}}@keyframes slideIn-3a741d94{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.content-wrapper[data-v-d41c9ce7]{text-align:left;max-width:800px;min-width:320px;margin-bottom:64px;min-height:calc(100vh - 438px)}.content-wrapper .content-box[data-v-d41c9ce7]{padding:24px;height:240px;background-color:#e8e8e8;border-radius:16px;width:50%;margin:48px auto;min-width:300px}.content-wrapper .video-box[data-v-d41c9ce7]{max-width:800px;min-width:320px;width:90vw;height:auto}
|
frontend/assets/{index-a389e3a7.js → index-fc3a0f87.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
frontend/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
| 5 |
<link rel="icon" type="image/svg+xml" href="./favicon.ico" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
<title>Translator</title>
|
| 8 |
-
<script type="module" crossorigin src="./assets/index-
|
| 9 |
-
<link rel="stylesheet" href="./assets/index-
|
| 10 |
</head>
|
| 11 |
<body>
|
| 12 |
<div id="app"></div>
|
|
|
|
| 5 |
<link rel="icon" type="image/svg+xml" href="./favicon.ico" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
<title>Translator</title>
|
| 8 |
+
<script type="module" crossorigin src="./assets/index-fc3a0f87.js"></script>
|
| 9 |
+
<link rel="stylesheet" href="./assets/index-b1f15c01.css">
|
| 10 |
</head>
|
| 11 |
<body>
|
| 12 |
<div id="app"></div>
|
main.py
CHANGED
|
@@ -3,7 +3,7 @@ from transcribe.serve import WhisperTranscriptionService
|
|
| 3 |
from uuid import uuid1
|
| 4 |
from logging import getLogger
|
| 5 |
import numpy as np
|
| 6 |
-
from transcribe.
|
| 7 |
from contextlib import asynccontextmanager
|
| 8 |
from multiprocessing import Process, freeze_support
|
| 9 |
from fastapi.staticfiles import StaticFiles
|
|
@@ -33,7 +33,7 @@ async def get_audio_from_websocket(websocket)->np.array:
|
|
| 33 |
@asynccontextmanager
|
| 34 |
async def lifespan(app:FastAPI):
|
| 35 |
global pipe
|
| 36 |
-
pipe =
|
| 37 |
pipe.wait_ready()
|
| 38 |
logger.info("Pipeline is ready.")
|
| 39 |
yield
|
|
|
|
| 3 |
from uuid import uuid1
|
| 4 |
from logging import getLogger
|
| 5 |
import numpy as np
|
| 6 |
+
from transcribe.processing import ProcessingPipes
|
| 7 |
from contextlib import asynccontextmanager
|
| 8 |
from multiprocessing import Process, freeze_support
|
| 9 |
from fastapi.staticfiles import StaticFiles
|
|
|
|
| 33 |
@asynccontextmanager
|
| 34 |
async def lifespan(app:FastAPI):
|
| 35 |
global pipe
|
| 36 |
+
pipe = ProcessingPipes()
|
| 37 |
pipe.wait_ready()
|
| 38 |
logger.info("Pipeline is ready.")
|
| 39 |
yield
|
moyoyo_asr_models/ggml-medium-encoder.mlmodelc/analytics/coremldata.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:adbe456375e7eb3407732a426ecb65bbda86860e4aa801f3a696b70b8a533cdd
|
| 3 |
-
size 207
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-medium-encoder.mlmodelc/coremldata.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:05fe28591b40616fa0c34ad7b853133623f5300923ec812acb11459c411acf3b
|
| 3 |
-
size 149
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-medium-encoder.mlmodelc/metadata.json
DELETED
|
@@ -1,64 +0,0 @@
|
|
| 1 |
-
[
|
| 2 |
-
{
|
| 3 |
-
"metadataOutputVersion" : "3.0",
|
| 4 |
-
"storagePrecision" : "Float16",
|
| 5 |
-
"outputSchema" : [
|
| 6 |
-
{
|
| 7 |
-
"hasShapeFlexibility" : "0",
|
| 8 |
-
"isOptional" : "0",
|
| 9 |
-
"dataType" : "Float32",
|
| 10 |
-
"formattedType" : "MultiArray (Float32)",
|
| 11 |
-
"shortDescription" : "",
|
| 12 |
-
"shape" : "[]",
|
| 13 |
-
"name" : "output",
|
| 14 |
-
"type" : "MultiArray"
|
| 15 |
-
}
|
| 16 |
-
],
|
| 17 |
-
"modelParameters" : [
|
| 18 |
-
|
| 19 |
-
],
|
| 20 |
-
"specificationVersion" : 6,
|
| 21 |
-
"mlProgramOperationTypeHistogram" : {
|
| 22 |
-
"Linear" : 144,
|
| 23 |
-
"Matmul" : 48,
|
| 24 |
-
"Cast" : 2,
|
| 25 |
-
"Conv" : 2,
|
| 26 |
-
"Softmax" : 24,
|
| 27 |
-
"Add" : 49,
|
| 28 |
-
"LayerNorm" : 49,
|
| 29 |
-
"Mul" : 48,
|
| 30 |
-
"Transpose" : 97,
|
| 31 |
-
"Gelu" : 26,
|
| 32 |
-
"Reshape" : 96
|
| 33 |
-
},
|
| 34 |
-
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 35 |
-
"isUpdatable" : "0",
|
| 36 |
-
"availability" : {
|
| 37 |
-
"macOS" : "12.0",
|
| 38 |
-
"tvOS" : "15.0",
|
| 39 |
-
"watchOS" : "8.0",
|
| 40 |
-
"iOS" : "15.0",
|
| 41 |
-
"macCatalyst" : "15.0"
|
| 42 |
-
},
|
| 43 |
-
"modelType" : {
|
| 44 |
-
"name" : "MLModelType_mlProgram"
|
| 45 |
-
},
|
| 46 |
-
"userDefinedMetadata" : {
|
| 47 |
-
|
| 48 |
-
},
|
| 49 |
-
"inputSchema" : [
|
| 50 |
-
{
|
| 51 |
-
"hasShapeFlexibility" : "0",
|
| 52 |
-
"isOptional" : "0",
|
| 53 |
-
"dataType" : "Float32",
|
| 54 |
-
"formattedType" : "MultiArray (Float32 1 × 80 × 3000)",
|
| 55 |
-
"shortDescription" : "",
|
| 56 |
-
"shape" : "[1, 80, 3000]",
|
| 57 |
-
"name" : "logmel_data",
|
| 58 |
-
"type" : "MultiArray"
|
| 59 |
-
}
|
| 60 |
-
],
|
| 61 |
-
"generatedClassName" : "coreml_encoder_medium",
|
| 62 |
-
"method" : "predict"
|
| 63 |
-
}
|
| 64 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-medium-encoder.mlmodelc/model.mil
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
moyoyo_asr_models/ggml-medium-encoder.mlmodelc/weights/weight.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6a188b0e4e3109f28f38f1f47ea2497ffe623923419df8e1ae12cb5f809a1815
|
| 3 |
-
size 614507008
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-medium-q5_0.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:19fea4b380c3a618ec4723c3eef2eb785ffba0d0538cf43f8f235e7b3b34220f
|
| 3 |
-
size 539212467
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-small-encoder.mlmodelc/analytics/coremldata.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:18ad2072ae82872c2ba8a187071e1e7d6c1105253685e7aa95138adcf07874e0
|
| 3 |
-
size 207
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-small-encoder.mlmodelc/coremldata.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:05fe28591b40616fa0c34ad7b853133623f5300923ec812acb11459c411acf3b
|
| 3 |
-
size 149
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-small-encoder.mlmodelc/metadata.json
DELETED
|
@@ -1,64 +0,0 @@
|
|
| 1 |
-
[
|
| 2 |
-
{
|
| 3 |
-
"metadataOutputVersion" : "3.0",
|
| 4 |
-
"storagePrecision" : "Float16",
|
| 5 |
-
"outputSchema" : [
|
| 6 |
-
{
|
| 7 |
-
"hasShapeFlexibility" : "0",
|
| 8 |
-
"isOptional" : "0",
|
| 9 |
-
"dataType" : "Float32",
|
| 10 |
-
"formattedType" : "MultiArray (Float32)",
|
| 11 |
-
"shortDescription" : "",
|
| 12 |
-
"shape" : "[]",
|
| 13 |
-
"name" : "output",
|
| 14 |
-
"type" : "MultiArray"
|
| 15 |
-
}
|
| 16 |
-
],
|
| 17 |
-
"modelParameters" : [
|
| 18 |
-
|
| 19 |
-
],
|
| 20 |
-
"specificationVersion" : 6,
|
| 21 |
-
"mlProgramOperationTypeHistogram" : {
|
| 22 |
-
"Linear" : 72,
|
| 23 |
-
"Matmul" : 24,
|
| 24 |
-
"Cast" : 2,
|
| 25 |
-
"Conv" : 2,
|
| 26 |
-
"Softmax" : 12,
|
| 27 |
-
"Add" : 25,
|
| 28 |
-
"LayerNorm" : 25,
|
| 29 |
-
"Mul" : 24,
|
| 30 |
-
"Transpose" : 49,
|
| 31 |
-
"Gelu" : 14,
|
| 32 |
-
"Reshape" : 48
|
| 33 |
-
},
|
| 34 |
-
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 35 |
-
"isUpdatable" : "0",
|
| 36 |
-
"availability" : {
|
| 37 |
-
"macOS" : "12.0",
|
| 38 |
-
"tvOS" : "15.0",
|
| 39 |
-
"watchOS" : "8.0",
|
| 40 |
-
"iOS" : "15.0",
|
| 41 |
-
"macCatalyst" : "15.0"
|
| 42 |
-
},
|
| 43 |
-
"modelType" : {
|
| 44 |
-
"name" : "MLModelType_mlProgram"
|
| 45 |
-
},
|
| 46 |
-
"userDefinedMetadata" : {
|
| 47 |
-
|
| 48 |
-
},
|
| 49 |
-
"inputSchema" : [
|
| 50 |
-
{
|
| 51 |
-
"hasShapeFlexibility" : "0",
|
| 52 |
-
"isOptional" : "0",
|
| 53 |
-
"dataType" : "Float32",
|
| 54 |
-
"formattedType" : "MultiArray (Float32 1 × 80 × 3000)",
|
| 55 |
-
"shortDescription" : "",
|
| 56 |
-
"shape" : "[1, 80, 3000]",
|
| 57 |
-
"name" : "logmel_data",
|
| 58 |
-
"type" : "MultiArray"
|
| 59 |
-
}
|
| 60 |
-
],
|
| 61 |
-
"generatedClassName" : "coreml_encoder_small",
|
| 62 |
-
"method" : "predict"
|
| 63 |
-
}
|
| 64 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-small-encoder.mlmodelc/model.mil
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
moyoyo_asr_models/ggml-small-encoder.mlmodelc/weights/weight.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:87eed4ae76f11a2d4a50786bc7423d4b45c2d0d9ca05577a3bd2557452072eaf
|
| 3 |
-
size 176339456
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/ggml-small.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:951596a31b1c96a01b7a2b1bc511f665d900c679126134f6ec18db5ec4a485fe
|
| 3 |
-
size 487601984
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/qwen2.5-7b-instruct-q5_0-00001-of-00002.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:715a0c76b1b074ed65fe0fabf88b1df6f5f638318f15ba9f62a04d493e236d5f
|
| 3 |
-
size 4001112160
|
|
|
|
|
|
|
|
|
|
|
|
moyoyo_asr_models/qwen2.5-7b-instruct-q5_0-00002-of-00002.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6a254c888ebffcddf98b0c277433a339d9a8cbf970f246b0b6e6a9195e5d6cfb
|
| 3 |
-
size 1314064416
|
|
|
|
|
|
|
|
|
|
|
|
transcribe/helpers/vadprocessor.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
from copy import deepcopy
|
| 2 |
-
from queue import Queue, Empty
|
| 3 |
from time import time
|
| 4 |
from config import VAD_MODEL_PATH
|
| 5 |
from silero_vad import load_silero_vad
|
|
|
|
| 1 |
from copy import deepcopy
|
|
|
|
| 2 |
from time import time
|
| 3 |
from config import VAD_MODEL_PATH
|
| 4 |
from silero_vad import load_silero_vad
|
transcribe/{translatepipes.py → processing.py}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from .pipelines import WhisperPipe, MetaItem, WhisperChinese, Translate7BPipe, FunASRPipe, VadPipe, TranslatePipe
|
| 2 |
from .utils import timer
|
| 3 |
|
| 4 |
-
class
|
| 5 |
def __init__(self) -> None:
|
| 6 |
|
| 7 |
self._process = []
|
|
|
|
| 1 |
from .pipelines import WhisperPipe, MetaItem, WhisperChinese, Translate7BPipe, FunASRPipe, VadPipe, TranslatePipe
|
| 2 |
from .utils import timer
|
| 3 |
|
| 4 |
+
class ProcessingPipes:
|
| 5 |
def __init__(self) -> None:
|
| 6 |
|
| 7 |
self._process = []
|
transcribe/serve.py
CHANGED
|
@@ -10,9 +10,8 @@ import collections
|
|
| 10 |
from api_model import TransResult, Message
|
| 11 |
|
| 12 |
from .utils import log_block, start_thread, get_text_separator, filter_words
|
| 13 |
-
from .
|
| 14 |
-
|
| 15 |
-
from transcribe.pipelines import MetaItem
|
| 16 |
|
| 17 |
|
| 18 |
logger = getLogger("TranscriptionService")
|
|
@@ -25,7 +24,7 @@ class WhisperTranscriptionService:
|
|
| 25 |
"""
|
| 26 |
|
| 27 |
|
| 28 |
-
def __init__(self, websocket, pipe:
|
| 29 |
print('>>>>>>>>>>>>>>>> init service >>>>>>>>>>>>>>>>>>>>>>')
|
| 30 |
print('src_lang:', language)
|
| 31 |
self.source_language = language # 源语言
|
|
|
|
| 10 |
from api_model import TransResult, Message
|
| 11 |
|
| 12 |
from .utils import log_block, start_thread, get_text_separator, filter_words
|
| 13 |
+
from .processing import ProcessingPipes
|
| 14 |
+
from .pipelines import MetaItem
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
logger = getLogger("TranscriptionService")
|
|
|
|
| 24 |
"""
|
| 25 |
|
| 26 |
|
| 27 |
+
def __init__(self, websocket, pipe: ProcessingPipes, language=None, dst_lang=None, client_uid=None):
|
| 28 |
print('>>>>>>>>>>>>>>>> init service >>>>>>>>>>>>>>>>>>>>>>')
|
| 29 |
print('src_lang:', language)
|
| 30 |
self.source_language = language # 源语言
|