Support including TTS conditionally. (#699)
This commit is contained in:
@@ -15,9 +15,6 @@ set(srcs
|
||||
offline-stream.cc
|
||||
offline-tdnn-model-config.cc
|
||||
offline-transducer-model-config.cc
|
||||
offline-tts-model-config.cc
|
||||
offline-tts-vits-model-config.cc
|
||||
offline-tts.cc
|
||||
offline-wenet-ctc-model-config.cc
|
||||
offline-whisper-model-config.cc
|
||||
offline-zipformer-ctc-model-config.cc
|
||||
@@ -44,6 +41,14 @@ else()
|
||||
list(APPEND srcs faked-alsa.cc)
|
||||
endif()
|
||||
|
||||
if(SHERPA_ONNX_ENABLE_TTS)
|
||||
list(APPEND srcs
|
||||
offline-tts-model-config.cc
|
||||
offline-tts-vits-model-config.cc
|
||||
offline-tts.cc
|
||||
)
|
||||
endif()
|
||||
|
||||
pybind11_add_module(_sherpa_onnx ${srcs})
|
||||
|
||||
if(APPLE)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "sherpa-onnx/python/csrc/offline-model-config.h"
|
||||
#include "sherpa-onnx/python/csrc/offline-recognizer.h"
|
||||
#include "sherpa-onnx/python/csrc/offline-stream.h"
|
||||
#include "sherpa-onnx/python/csrc/offline-tts.h"
|
||||
#include "sherpa-onnx/python/csrc/online-lm-config.h"
|
||||
#include "sherpa-onnx/python/csrc/online-model-config.h"
|
||||
#include "sherpa-onnx/python/csrc/online-recognizer.h"
|
||||
@@ -27,6 +26,10 @@
|
||||
#include "sherpa-onnx/python/csrc/vad-model.h"
|
||||
#include "sherpa-onnx/python/csrc/voice-activity-detector.h"
|
||||
|
||||
#if SHERPA_ONNX_ENABLE_TTS == 1
|
||||
#include "sherpa-onnx/python/csrc/offline-tts.h"
|
||||
#endif
|
||||
|
||||
namespace sherpa_onnx {
|
||||
|
||||
PYBIND11_MODULE(_sherpa_onnx, m) {
|
||||
@@ -53,7 +56,10 @@ PYBIND11_MODULE(_sherpa_onnx, m) {
|
||||
PybindCircularBuffer(&m);
|
||||
PybindVoiceActivityDetector(&m);
|
||||
|
||||
#if SHERPA_ONNX_ENABLE_TTS == 1
|
||||
PybindOfflineTts(&m);
|
||||
#endif
|
||||
|
||||
PybindSpeakerEmbeddingExtractor(&m);
|
||||
PybindSpeakerEmbeddingManager(&m);
|
||||
PybindSpokenLanguageIdentification(&m);
|
||||
|
||||
Reference in New Issue
Block a user