Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TTS is not enabled. Please rebuild sherpa-onnx #1900

Closed
starship2018 opened this issue Feb 20, 2025 · 3 comments · Fixed by #1905
Closed

TTS is not enabled. Please rebuild sherpa-onnx #1900

starship2018 opened this issue Feb 20, 2025 · 3 comments · Fixed by #1905

Comments

@starship2018
Copy link

Image

LOG如下
D:\Project\sherpaDemo\cmake-build-release\sherpaDemo.exe
D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx\c-api\c-api.cc:SherpaOnnxCreateOfflineTts:1273 TTS is not enabled. Please rebuild sherpa-onnx
D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx\c-api\c-api.cc:SherpaOnnxOfflineTtsGenerateWithProgressCallback:1309 TTS is not enabled. Please rebuild sherpa-onnx
Exception: Exception 0xc0000005 encountered at address 0x7ff755ee1173: Access violation reading location 0x0000000c

ASR功能正常,TTS报错。这是需要重新自己编译吗?

@csukuangfj
Copy link
Collaborator

你目前是如何得到这个exe的呢?

@starship2018
Copy link
Author

从c-api-examples/matcha-tts-zh-c-api.c 中拷贝全部源码运行,下面是 sherpaDemo.exe 的CMakeLists.txt ,sherpa-onnx 中include lib bin均来自sherpa-onnx-v1.10.44-win-x64-shared ,运行编译环境是 MSVC2017 Windows11 x64,onnxruntime.dll onnxruntime_providers_shared.dll以及lib中的dll均已放置在exe同目录下。模型以及相关文件也都路径正确。

cmake_minimum_required(VERSION 3.28)
project(sherpaDemo)

set(CMAKE_CXX_STANDARD 17)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/sherpa-onnx/include/)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/sherpa-onnx/lib/)

add_executable(sherpaDemo main.cpp)
target_link_libraries(sherpaDemo sherpa-onnx-c-api)

@csukuangfj
Copy link
Collaborator

https://github.com/k2-fsa/sherpa-onnx/releases/

请去这里下载最新版本

Image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants