⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
from pathlib import Path
import soundfile as sf
import os
from paddlespeech.t2s.exps.syn_utils import get_am_output
from paddlespeech.t2s.exps.syn_utils import get_frontend
from paddlespeech.t2s.exps.syn_utils import get_predictor
from paddlespeech.t2s.exps.syn_utils import get_voc_output
def get_text_dict(name: str, txtname: str):
ff = open(txtname, "r", encoding="utf-8")
msg = ff.read()
ff.close()
text_list = msg.split("\n")
text_dict = {}
num = 0
for i in text_list:
text_dict[name + str(num)] = i
num += 1
print(f"{name}text:{num}")
return text_dict
from pathlib import Path import soundfile as sf import os from paddlespeech.t2s.exps.syn_utils import get_am_output from paddlespeech.t2s.exps.syn_utils import get_frontend from paddlespeech.t2s.exps.syn_utils import get_predictor from paddlespeech.t2s.exps.syn_utils import get_voc_output
def get_text_dict(name: str, txtname: str): ff = open(txtname, "r", encoding="utf-8") msg = ff.read() ff.close() text_list = msg.split("\n") text_dict = {} num = 0 for i in text_list: text_dict[name + str(num)] = i num += 1 print(f"{name}text:{num}") return text_dict
def the_main(text_dict):
frontend
if name == 'main':
模型路径
D:\ruanjian\ad3\envs\FJ_DEMO\python.exe D:\work\py\feijiang\main.py D:\ruanjian\ad3\envs\FJ_DEMO\lib\site-packages\lazy_loader__init.py:185: RuntimeWarning: subpackages can technically be lazily loaded, but it causes the package to be eagerly loaded even if it is already lazily loaded.So, you probably shouldn't use subpackages with this lazy feature. warnings.warn(msg, RuntimeWarning) D:\ruanjian\ad3\envs\FJ_DEMO\lib\site-packages_distutils_hack__init.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") doubao_01text:1 doubao_01text:2 [2024-03-20 08:45:52,493] [ INFO] - Already cached C:\Users\Administrator.paddlenlp\models\bert-base-chinese\bert-base-chinese-vocab.txt [2024-03-20 08:45:52,516] [ INFO] - tokenizer config file saved in C:\Users\Administrator.paddlenlp\models\bert-base-chinese\tokenizer_config.json [2024-03-20 08:45:52,516] [ INFO] - Special tokens file saved in C:\Users\Administrator.paddlenlp\models\bert-base-chinese\special_tokens_map.json e[1me[35m--- Running analysis [ir_graph_build_pass]e[0m I0320 08:45:54.643479 11628 executor.cc:187] Old Executor is Running. e[1me[35m--- Running analysis [ir_analysis_pass]e[0m e[32m--- Running IR pass [simplify_with_basic_ops_pass]e[0m e[32m--- Running IR pass [layer_norm_fuse_pass]e[0m e[32m--- Running IR pass [attention_lstm_fuse_pass]e[0m e[32m--- Running IR pass [seqconv_eltadd_relu_fuse_pass]e[0m e[32m--- Running IR pass [seqpool_cvm_concat_fuse_pass]e[0m e[32m--- Running IR pass [mul_lstm_fuse_pass]e[0m e[32m--- Running IR pass [fc_gru_fuse_pass]e[0m e[32m--- Running IR pass [mul_gru_fuse_pass]e[0m e[32m--- Running IR pass [seq_concat_fc_fuse_pass]e[0m e[32m--- Running IR pass [gpu_cpu_squeeze2_matmul_fuse_pass]e[0m e[32m--- Running IR pass [gpu_cpu_reshape2_matmul_fuse_pass]e[0m e[32m--- Running IR pass [gpu_cpu_flatten2_matmul_fuse_pass]e[0m e[32m--- Running IR pass [matmul_v2_scale_fuse_pass]e[0m e[32m--- Running IR pass [gpu_cpu_map_matmul_v2_to_mul_pass]e[0m I0320 08:45:54.957129 11628 fuse_pass_base.cc:59] --- detected 37 subgraphs e[32m--- Running IR pass [gpu_cpu_map_matmul_v2_to_matmul_pass]e[0m I0320 08:45:54.967124 11628 fuse_pass_base.cc:59] --- detected 17 subgraphs e[32m--- Running IR pass [matmul_scale_fuse_pass]e[0m I0320 08:45:54.977124 11628 fuse_pass_base.cc:59] --- detected 8 subgraphs e[32m--- Running IR pass [gpu_cpu_map_matmul_to_mul_pass]e[0m e[32m--- Running IR pass [fc_fuse_pass]e[0m I0320 08:45:55.071126 11628 fuse_pass_base.cc:59] --- detected 37 subgraphs e[32m--- Running IR pass [repeated_fc_relu_fuse_pass]e[0m e[32m--- Running IR pass [squared_mat_sub_fuse_pass]e[0m e[32m--- Running IR pass [conv_bn_fuse_pass]e[0m e[32m--- Running IR pass [conv_eltwiseadd_bn_fuse_pass]e[0m e[32m--- Running IR pass [conv_transpose_bn_fuse_pass]e[0m e[32m--- Running IR pass [conv_transpose_eltwiseadd_bn_fuse_pass]e[0m e[32m--- Running IR pass [is_test_pass]e[0m e[32m--- Running IR pass [constant_folding_pass]e[0m I0320 08:45:55.720499 11628 fuse_pass_base.cc:59] --- detected 171 subgraphs e[1me[35m--- Running analysis [save_optimized_model_pass]e[0m e[1me[35m--- Running analysis [ir_params_sync_among_devices_pass]e[0m e[1me[35m--- Running analysis [adjust_cudnn_workspace_size_pass]e[0m e[1me[35m--- Running analysis [inference_op_replace_pass]e[0m e[1me[35m--- Running analysis [memory_optimize_pass]e[0m F0320 08:45:55.725492 11628 memory_optimize_pass.cc:95] Check failed: i >= 0 (-1 vs. 0) Check failure stack trace: @ 00007FFF7B895025 PyIniteval_frame @ 00007FFF7B8945D2 PyIniteval_frame @ 00007FFF7D7D90F8 class paddle::Tensor cdecl paddle::from_blob(void ptr64,class paddle::experimental::IntArrayBase const & ptr64,enum phi::DataType,enum common::DataLayout,class phi::Place const & ptr64,class std::function<void cdecl(v
@ 00007FFF7D7DA5D6 class paddle::Tensor __cdecl paddle::from_blob(void ptr64,class paddle::experimental::IntArrayBase const & ptr64,enum phi::DataType,enum common::DataLayout,class phi::Place const & ptr64,class std::function<void cdecl(v
@ 00007FFF7D7CF609 class paddle::Tensor cdecl paddle::from_blob(void * ptr64,class paddle::experimental::IntArrayBase const & ptr64,enum phi::DataType,enum common::DataLayout,class phi::Place const & ptr64,class std::function<void cdecl(v
@ 00007FFF7B9AC455 class std::basic_string<char,struct std::char_traits,class std::allocator > cdecl paddle_infer::GetVersion(void)
@ 00007FFF7B9AB539 class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl paddle_infer::GetVersion(void)
@ 00007FFF7B99C7CF class std::unique_ptr<class paddle::PaddlePredictor,struct std::default_delete > cdecl paddle::CreatePaddlePredictor<struct paddle::AnalysisConfig,2>(struct paddle::AnalysisConfig const & ptr64)
@ 00007FFF7B9A3C5B public: cdecl paddle_infer::Predictor::Predictor(struct paddle::AnalysisConfig const & ptr64) ptr64
@ 00007FFF7B634C7D public: class paddle::ZeroCopyTensor & ptr64 cdecl paddle::ZeroCopyTensor::operator=(class paddle::ZeroCopyTensor const & ptr64) ptr64
@ 00007FFF7B60E1B6 PyInit_libpaddle
@ 00007FFF7B2FE469 public: class paddle::OpMetaInfoBuilder & ptr64 cdecl paddle::OpMetaInfoBuilder::operator=(class paddle::OpMetaInfoBuilder const & ptr64) ptr64
@ 00007FFF885882C6 PyCFunction_GetFlags
@ 00007FFF8854551C _PyObject_MakeTpCall
@ 00007FFF8863E6C2 PyEval_GetFuncDesc
@ 00007FFF8863AE6F _PyEval_EvalFrameDefault
@ 00007FFF8863CE4B _PyEval_EvalFrameDefault
@ 00007FFF8854582E _PyFunction_Vectorcall
@ 00007FFF88636179 _PyOS_URandomNonblock
@ 00007FFF8863E6C2 PyEval_GetFuncDesc
@ 00007FFF8863AED8 _PyEval_EvalFrameDefault
@ 00007FFF8863CE4B _PyEval_EvalFrameDefault
@ 00007FFF8854582E _PyFunction_Vectorcall
@ 00007FFF88636179 _PyOS_URandomNonblock
@ 00007FFF8863E6C2 PyEval_GetFuncDesc
@ 00007FFF8863A8B2 _PyEval_EvalFrameDefault
@ 00007FFF8863CE4B _PyEval_EvalFrameDefault
@ 00007FFF88637892 PyEval_EvalCode
@ 00007FFF886AE05E PyRun_FileExFlags
@ 00007FFF886AE138 PyRun_FileExFlags
@ 00007FFF886ADCE8 PyRun_StringFlags
@ 00007FFF886ABF45 _PyRun_SimpleFileObject
进程已结束,退出代码为 -1073740791 (0xC0000409)
请问这个报错是为什么?找不到解决办法了。