Comments (6)
按照 models 文件夹里面的文本文件里所写的方法下载标点符号模型
from capswriter-offline.
并且检查 funasr_onnx 的版本是否与 requirements-server.txt 里要求的是否一致
from capswriter-offline.
感谢您的回答!我按照 models 文件夹重新下载模型,然后重新下载符合版本的 funasr_onnx 后出现了新的问题:
(keyaudio) zhangyiqing@inin:~/CapsWriter-Offline$ python core_server.py
──────────────────────────────────────────────────────────────────────────────────────────── CapsWriter Offline Server ────────────────────────────────────────────────────────────────────────────────────────────
项目地址:https://github.com/HaujetZhao/CapsWriter-Offline
当前基文件夹:/home/zhangyiqing/CapsWriter-Offline
绑定的服务地址:0.0.0.0:6016
/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/funasr_onnx/punc_bin.py:279: FutureWarning: In the future np.bool
will be defined as the corresponding NumPy scalar.
def vad_mask(self, size, vad_pos, dtype=np.bool):
Process Process-1:
Traceback (most recent call last):
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/zhangyiqing/CapsWriter-Offline/util/server_init_recognizer.py", line 28, in init_recognizer
from funasr_onnx import CT_Transformer
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/funasr_onnx/init.py", line 5, in
from .punc_bin import CT_Transformer
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/funasr_onnx/punc_bin.py", line 166, in
class CT_Transformer_VadRealtime(CT_Transformer):
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/funasr_onnx/punc_bin.py", line 279, in CT_Transformer_VadRealtime
def vad_mask(self, size, vad_pos, dtype=np.bool):
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/numpy/init.py", line 324, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
np.bool
was a deprecated alias for the builtin bool
. To avoid this error in existing code, use bool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_
here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
我下载的numpy版本是1.26.3,请问是numpy版本过高吗?
from capswriter-offline.
用 1.23 或 1.24 试试
from capswriter-offline.
numpy 降低版本到 1.23.4 后,很不幸又出现了与第一次相同的问题:
(keyaudio) zhangyiqing@inin:~/CapsWriter-Offline$ python core_server.py
────────────────────────────────────────────────────────────────────────────────────────── CapsWriter Offline Server ──────────────────────────────────────────────────────────────────────────────────────────
项目地址:https://github.com/HaujetZhao/CapsWriter-Offline
当前基文件夹:/home/zhangyiqing/CapsWriter-Offline
绑定的服务地址:0.0.0.0:6016
模块加载完成
语音模型载入完成
Process Process-1:
Traceback (most recent call last):
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/zhangyiqing/CapsWriter-Offline/util/server_init_recognizer.py", line 42, in init_recognizer
punc_model = CT_Transformer(ModelPaths.punc_model_dir, quantize=True)
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/funasr_onnx/punc_bin.py", line 69, in init
self.ort_infer = OrtInferSession(model_file, device_id, intra_op_num_threads=intra_op_num_threads)
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/funasr_onnx/utils/utils.py", line 209, in init
self.session = InferenceSession(model_file,
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "/home/zhangyiqing/miniconda3/envs/keyaudio/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 452, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from models/punc_ct-transformer_cn-en/model_quant.onnx failed:Protobuf parsing failed.
——————————————————
安装的依赖与 requirements-server.txt 要求是一致的
from capswriter-offline.
谢谢您的回答,core_server.py 已经可以运行了。之前的问题是:当我直接下载模型时,其中有 3 个大文件,直接使用 models 文件夹中的下载命令时,这 3 个文件不会真正下载,只会下载类似“指针”的1KB文件。我手动下载这 3 个文件后,程序可以正常运行。: )
from capswriter-offline.
Related Issues (20)
- 小提示,numpy没有指定版本
- 能否实现实时字幕功能 HOT 1
- 能否增加选择采集设备的功能 HOT 1
- 請問如何更換為粵語模型? HOT 1
- 能否添加实时转录的功能和接口
- issue: 关于复杂的模型下载问题 HOT 1
- 已提交内存3G
- 希望提供GNU/Linux软件包
- 两个痛点,关于连续录音以及录音文件直接转化的问题 HOT 1
- 关于软件的一些建议
- 软件适配建议
- 关于长词无法准确识别的问题
- 最新 GUI 版本音视频生成字幕有问题 HOT 2
- 中英文识别错误
- 对于部分程序不支持直接输入
- 请问支持cuda吗?
- 安装好了 但是无法唤起音视频 转文字
- 不使用剪切板模式的时候,识别时有标点符号,但上屏没有
- 请问有 Mac 版吗
- use FunAudioLLM/SenseVoiceSmall and cuda version instead
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capswriter-offline.