Skip to content

Commit

Permalink
Play generated audio as it is generating. (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Dec 2, 2023
1 parent 539b27e commit 99ff6a8
Show file tree
Hide file tree
Showing 20 changed files with 876 additions and 79 deletions.
1 change: 1 addition & 0 deletions cmake/cmake_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def build_extension(self, ext: setuptools.extension.Extension):
binaries += ["sherpa-onnx-vad-microphone"]
binaries += ["sherpa-onnx-vad-microphone-offline-asr"]
binaries += ["sherpa-onnx-offline-tts"]
binaries += ["sherpa-onnx-offline-tts-play"]

if is_windows():
binaries += ["kaldi-native-fbank-core.dll"]
Expand Down
4 changes: 4 additions & 0 deletions cmake/espeak-ng-for-piper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ function(download_espeak_ng_for_piper)
set(espeak_ng_URL2 "")
set(espeak_ng_HASH "SHA256=8a48251e6926133dd91fcf6cb210c7c2e290a9b578d269446e2d32d710b0dfa0")

set(BUILD_ESPEAK_NG_TESTS OFF CACHE BOOL "" FORCE)
set(USE_ASYNC OFF CACHE BOOL "" FORCE)
set(USE_MBROLA OFF CACHE BOOL "" FORCE)
set(USE_LIBSONIC OFF CACHE BOOL "" FORCE)
Expand Down Expand Up @@ -106,10 +107,12 @@ function(download_espeak_ng_for_piper)
if(SHERPA_ONNX_ENABLE_PYTHON AND WIN32)
install(TARGETS
espeak-ng
ucd
DESTINATION ..)
else()
install(TARGETS
espeak-ng
ucd
DESTINATION lib)
endif()

Expand All @@ -120,6 +123,7 @@ function(download_espeak_ng_for_piper)
if(WIN32 AND BUILD_SHARED_LIBS)
install(TARGETS
espeak-ng
ucd
DESTINATION bin)
endif()
endfunction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
sherpa-onnx-fst.lib;
kaldi-native-fbank-core.lib;
onnxruntime.lib;
piper_phonemize.lib;
espeak-ng.lib;
ucd.lib;
</SherpaOnnxLibraries>
</PropertyGroup>
<ItemDefinitionGroup>
Expand Down
3 changes: 3 additions & 0 deletions mfc-examples/NonStreamingTextToSpeech/sherpa-onnx-deps.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
sherpa-onnx-fst.lib;
kaldi-native-fbank-core.lib;
onnxruntime.lib;
piper_phonemize.lib;
espeak-ng.lib;
ucd.lib;
</SherpaOnnxLibraries>
</PropertyGroup>
<ItemDefinitionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
sherpa-onnx-fst.lib;
kaldi-native-fbank-core.lib;
onnxruntime.lib;
piper_phonemize.lib;
espeak-ng.lib;
ucd.lib;
</SherpaOnnxLibraries>
</PropertyGroup>
<ItemDefinitionGroup>
Expand Down
Loading

0 comments on commit 99ff6a8

Please sign in to comment.