Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Dockerfile.redhat
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
ARG JOBS=40
ARG VERBOSE_LOGS=OFF
ARG LTO_ENABLE=OFF
ARG ESPEAK=1

# hadolint ignore=DL3041
RUN dnf install -y -d6 \
Expand All @@ -129,6 +130,8 @@ RUN dnf install -y -d6 \
python3.12-pip \
libicu-devel && \
dnf clean all
# Note: espeak-ng is no longer installed from dnf; it is built from source
# by Bazel (see third_party/espeak_ng) and bundled in the release.

WORKDIR /

Expand Down Expand Up @@ -234,11 +237,11 @@ RUN git clone https://github.com/$ov_tokenizers_org/openvino_tokenizers.git /ope
fi

WORKDIR /openvino_genai/
ARG ov_genai_branch=master
ARG ov_genai_org=openvinotoolkit
ARG ov_genai_branch=kokoro_tts
ARG ov_genai_repo=https://github.com/RyanMetcalfeInt8/openvino.genai.git
Comment on lines +240 to +241
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will need to be reverted before merge

# hadolint ignore=DL3003
RUN if [ "$ov_use_binary" == "0" ]; then true ; else exit 0 ; fi ; \
git clone https://github.com/$ov_genai_org/openvino.genai /openvino_genai && cd /openvino_genai && git checkout $ov_genai_branch && git submodule update --init --recursive && \
git clone $ov_genai_repo /openvino_genai && cd /openvino_genai && git checkout $ov_genai_branch && git submodule update --init --recursive && \
Comment on lines 239 to +244
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS=" ${SDL_OPS} ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_SYSTEM_ICU="True" -DBUILD_TOKENIZERS=OFF -DENABLE_SAMPLES=OFF -DENABLE_TOOLS=OFF -DENABLE_TESTS=OFF -DENABLE_XGRAMMAR=ON -S ./ -B ./build/ && \
Comment on lines 239 to 245
cmake --build ./build/ --parallel $JOBS && cp -vP /openvino_genai/build/openvino_genai/lib*.so* /opt/intel/openvino/runtime/lib/intel64/ && \
cp -r /openvino_genai/src/cpp/include/* /opt/intel/openvino/runtime/include/ && \
Expand Down Expand Up @@ -393,6 +396,7 @@ LABEL "maintainer"="dariusz.trawinski@intel.com"
ARG INSTALL_RPMS_FROM_URL=
ARG INSTALL_DRIVER_VERSION="24.52.32224"
ARG GPU=0
ARG ESPEAK=1
ARG debug_bazel_flags=
LABEL bazel-build-flags=${debug_bazel_flags}
LABEL supported-devices="CPU=1 GPU=${GPU}"
Expand All @@ -407,6 +411,8 @@ COPY ./install_redhat_gpu_drivers.sh /install_gpu_drivers.sh
# hadolint ignore=DL3003,DL3041,SC2164,SC1091
RUN if [ -f /usr/bin/dnf ] ; then export DNF_TOOL=dnf ; echo -e "max_parallel_downloads=8\nretries=50" >> /etc/dnf/dnf.conf ; else export DNF_TOOL=microdnf ; fi ; \
$DNF_TOOL upgrade --setopt=install_weak_deps=0 --nodocs -y ; \
# espeak-ng shared library + data are shipped inside /ovms by the Bazel
# build when $ESPEAK == "1"; no system package is required at runtime.
if [ "$GPU" == "1" ] ; then \
source /install_gpu_drivers.sh && rm -rf /install_gpu_drivers.sh; \
fi ; \
Expand All @@ -422,6 +428,11 @@ RUN if [ -f /usr/bin/dnf ] ; then export DNF_TOOL=dnf ; echo -e "max_parallel_do

ENV LD_LIBRARY_PATH=/ovms/lib
ENV PATH="$PATH:/ovms/bin"
# When espeak-ng is built into the OVMS release, the libespeak-ng.so loaded
# at runtime needs to locate its data tables. They are shipped under
# /ovms/share/espeak-ng-data; point espeak-ng at that location explicitly so
# we do not depend on any system /usr/share/espeak-ng-data.
ENV ESPEAK_DATA_PATH=/ovms/share/espeak-ng-data

COPY --from=pkg /ovms_release /ovms
COPY --from=pkg /usr/local/lib/python3.12/site-packages/jinja2 /ovms/python_deps/jinja2
Expand Down
17 changes: 14 additions & 3 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]

ARG debug_bazel_flags="--strip=always --config=mp_on_py_on --//:distro=ubuntu"
ARG ESPEAK=1
RUN if [ "$BASE_OS" == "ubuntu24" ] ; then apt-get update && \
apt-get install -y software-properties-common --no-install-recommends; add-apt-repository 'ppa:deadsnakes/ppa' -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* ; fi
Expand Down Expand Up @@ -124,6 +125,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
vim && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Note: espeak-ng is no longer installed from apt here; it is built from
# source by Bazel (see third_party/espeak_ng) and bundled in the release.
# on ubuntu 24.04 python3.12 is used as default python for ovms build and release
# TF build needs python3.10 with numpy as it does not support python3.12
RUN python3.10 -m pip install "numpy<2.0.0" --no-cache-dir
Expand Down Expand Up @@ -220,12 +223,12 @@ RUN if [ "$ov_use_binary" == "0" ]; then true ; else exit 0 ; fi ; \
if ! [[ $debug_bazel_flags == *"_py_off"* ]]; then \
cp build/python/* /opt/intel/openvino/python/openvino_tokenizers/ ; \
fi
ARG ov_genai_branch=master
ARG ov_genai_org=openvinotoolkit
ARG ov_genai_branch=kokoro_tts
ARG ov_genai_repo=https://github.com/RyanMetcalfeInt8/openvino.genai.git
WORKDIR /openvino_genai/
# hadolint ignore=DL3003
RUN if [ "$ov_use_binary" == "0" ]; then \
git clone https://github.com/$ov_genai_org/openvino.genai /openvino_genai && cd /openvino_genai && git checkout $ov_genai_branch && git submodule update --init --recursive && \
git clone $ov_genai_repo /openvino_genai && cd /openvino_genai && git checkout $ov_genai_branch && git submodule update --init --recursive && \
Comment on lines +226 to +231
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS=" ${SDL_OPS} " -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_SYSTEM_ICU="True" -DBUILD_TOKENIZERS=OFF -DENABLE_SAMPLES=OFF -DENABLE_TOOLS=OFF -DENABLE_TESTS=OFF -DENABLE_XGRAMMAR=ON -S ./ -B ./build/ && \
Comment on lines +226 to 232
cmake --build ./build/ --parallel $JOBS && cp /openvino_genai/build/openvino_genai/lib*.so* /opt/intel/openvino/runtime/lib/intel64/ && \
cp -r /openvino_genai/src/cpp/include/* /opt/intel/openvino/runtime/include/ && \
Expand Down Expand Up @@ -395,6 +398,7 @@ ARG INSTALL_RPMS_FROM_URL=
ARG INSTALL_DRIVER_VERSION="24.26.30049"
ARG GPU=0
ARG NPU=0
ARG ESPEAK=1
ENV DEBIAN_FRONTEND=noninteractive
ARG debug_bazel_flags=
LABEL bazel-build-flags=${debug_bazel_flags}
Expand All @@ -413,6 +417,8 @@ COPY ./install_ubuntu_gpu_drivers.sh /tmp/install_gpu_drivers.sh
# hadolint ignore=DL3003,SC2164
RUN apt-get update ; \
apt-get install -y --no-install-recommends curl ca-certificates libxml2 || exit 1; \
# espeak-ng shared library + data are shipped inside /ovms by the Bazel
# build when $ESPEAK == "1"; no system package is required at runtime.
if [ "$GPU" == "1" ] ; then \
/tmp/install_gpu_drivers.sh ; \
fi ; \
Expand Down Expand Up @@ -451,6 +457,11 @@ RUN if ! [[ $debug_bazel_flags == *"py_off"* ]]; then true ; else exit 0 ; fi ;

ENV LD_LIBRARY_PATH=/ovms/lib
ENV PATH="$PATH:/ovms/bin"
# When espeak-ng is built into the OVMS release, the libespeak-ng.so loaded
# at runtime needs to locate its data tables. They are shipped under
# /ovms/share/espeak-ng-data; point espeak-ng at that location explicitly so
# we do not depend on any system /usr/share/espeak-ng-data.
ENV ESPEAK_DATA_PATH=/ovms/share/espeak-ng-data

RUN echo "The source code of added GPL components is stored in https://storage.openvinotoolkit.org/repositories/openvino/ci_dependencies/container_gpl_sources/" > /ovms/thirdparty-licenses/GPL.txt
USER ovms
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ BUILD_TESTS ?= 0
RUN_GPU_TESTS ?=
GPU ?= 0
NPU ?= 0
ESPEAK ?= 1
BUILD_NGINX ?= 0
MEDIAPIPE_DISABLE ?= 0
PYTHON_DISABLE ?= 0
Expand Down Expand Up @@ -146,8 +147,13 @@ else ifeq ($(findstring redhat,$(BASE_OS)),redhat)
else
$(error BASE_OS must be either ubuntu or redhat)
endif
CAPI_FLAGS = "--strip=$(STRIP)"$(BAZEL_DEBUG_BUILD_FLAGS)" --config=mp_off_py_off"$(OV_TRACING_PARAMS)$(TARGET_DISTRO_PARAMS)
BAZEL_DEBUG_FLAGS="--strip=$(STRIP)"$(BAZEL_DEBUG_BUILD_FLAGS)$(DISABLE_PARAMS)$(FUZZER_BUILD_PARAMS)$(OV_TRACING_PARAMS)$(TARGET_DISTRO_PARAMS)$(REPO_ENV)
ifeq ($(ESPEAK),1)
ESPEAK_PARAMS = " --//:espeak=on"
else
ESPEAK_PARAMS = " --//:espeak=off"
endif
CAPI_FLAGS = "--strip=$(STRIP)"$(BAZEL_DEBUG_BUILD_FLAGS)" --config=mp_off_py_off"$(OV_TRACING_PARAMS)$(TARGET_DISTRO_PARAMS)$(ESPEAK_PARAMS)
BAZEL_DEBUG_FLAGS="--strip=$(STRIP)"$(BAZEL_DEBUG_BUILD_FLAGS)$(DISABLE_PARAMS)$(FUZZER_BUILD_PARAMS)$(OV_TRACING_PARAMS)$(TARGET_DISTRO_PARAMS)$(ESPEAK_PARAMS)$(REPO_ENV)

# Option to Override release image.
# Release image OS *must have* glibc version >= glibc version on BASE_OS:
Expand Down Expand Up @@ -237,6 +243,7 @@ BUILD_ARGS = --build-arg http_proxy=$(HTTP_PROXY)\
--build-arg BASE_OS=$(BASE_OS)\
--build-arg INSTALL_RPMS_FROM_URL=$(INSTALL_RPMS_FROM_URL)\
--build-arg INSTALL_DRIVER_VERSION=$(INSTALL_DRIVER_VERSION)\
--build-arg ESPEAK=$(ESPEAK)\
--build-arg RELEASE_BASE_IMAGE=$(BASE_IMAGE_RELEASE)\
--build-arg JOBS=$(JOBS)\
--build-arg CAPI_FLAGS=$(CAPI_FLAGS)\
Expand Down
4 changes: 4 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@ libgit2_engine()
load("@ovms//third_party/drogon:drogon.bzl", "drogon_cpp")
drogon_cpp()

### espeak-ng (built from source via Bazel; gated by --//:espeak flag)
load("@ovms//third_party/espeak_ng:espeak_ng.bzl", "espeak_ng")
espeak_ng()

# Azure Storage SDK
new_local_repository(
name = "azure",
Expand Down
3 changes: 2 additions & 1 deletion common_settings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@mediapipe//mediapipe/framework:more_selects.bzl", "more_selects")
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("//:distro.bzl", "distro_flag")
load("//:distro.bzl", "distro_flag", "espeak_flag")

# cc_library rule wrapper that will accept the same arguments but if user will not provide
# copts, linkopts, local_defines it will set them to the defaults
Expand Down Expand Up @@ -52,6 +52,7 @@ def ovms_cc_library(**kwargs):

def create_config_settings():
distro_flag()
espeak_flag()
native.config_setting(
name = "disable_mediapipe",
define_values = {
Expand Down
21 changes: 21 additions & 0 deletions create_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,27 @@ mkdir -vp /ovms_release/lib/custom_nodes
if [ "$ov_use_binary" == "0" ] ; then cp -v /openvino_tokenizers/build/src/libopenvino_tokenizers.so /ovms_release/lib/ ; fi

find /ovms/bazel-out/k8-*/bin -iname '*.so*' ! -type d ! -name "libgtest.so" ! -name "*params" ! -name "*.hana.*" ! -name "py_generate_pipeline.cpython*" ! -name "lib_node_*" ! -path "*test_python_binding*" ! -name "*libpython*" -exec cp -v {} /ovms_release/lib/ \;

# Bundle espeak-ng data files when espeak was enabled in the Bazel build.
# rules_foreign_cc places the cmake install tree under copy_<rule>/espeak-ng/
# inside bazel-out. Both the shared library (picked up by the find above)
# and the espeak-ng-data directory are required at runtime.
ESPEAK_DATA_SRC=$(find /ovms/bazel-out/k8-*/bin/external/espeak_ng -type d -name 'espeak-ng-data' 2>/dev/null | head -n 1 || true)
if [ -n "$ESPEAK_DATA_SRC" ] && [ -d "$ESPEAK_DATA_SRC" ] ; then
mkdir -p /ovms_release/share
cp -rL "$ESPEAK_DATA_SRC" /ovms_release/share/ ;
fi
# The version matches the espeak-ng tag pinned
# in third_party/espeak_ng/espeak_ng.bzl (1.52.0);
# update both places together when bumping espeak-ng.
ESPEAK_REAL=libespeak-ng.so.1.52.0.1
if [ -f "/ovms_release/lib/$ESPEAK_REAL" ]; then
cd /ovms_release/lib
rm -f libespeak-ng.so libespeak-ng.so.1
ln -s "$ESPEAK_REAL" libespeak-ng.so.1
ln -s "$ESPEAK_REAL" libespeak-ng.so
cd - >/dev/null
fi
if [ "$FUZZER_BUILD" == "0" ]; then mv /ovms_release/lib/libcustom_node* /ovms_release/lib/custom_nodes/; fi;
cd /ovms_release/lib/ ; rm -f libcurl.so*
cd /ovms_release/lib/ ; rm -f libazurestorage.so.* ; ln -s libazurestorage.so libazurestorage.so.7 ;ln -s libazurestorage.so libazurestorage.so.7.5
Expand Down
61 changes: 49 additions & 12 deletions demos/common/export_models/export_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ def add_common_arguments(parser):
parser_text2speech = subparsers.add_parser('text2speech', help='export model for text2speech endpoint')
add_common_arguments(parser_text2speech)
parser_text2speech.add_argument('--num_streams', default=0, type=int, help='The number of parallel execution streams to use for the models in the pipeline.', dest='num_streams')
parser_text2speech.add_argument('--vocoder', type=str, help='The vocoder model to use for text2speech. For example microsoft/speecht5_hifigan', dest='vocoder')
parser_text2speech.add_argument('--speaker_name', type=str, help='Name of the speaker', dest='speaker_name')
parser_text2speech.add_argument('--speaker_path', type=str, help='Path to the speaker.bin file.', dest='speaker_path')
parser_text2speech.add_argument('--model_type', default='speecht5', choices=['speecht5', 'kokoro'], help='Type of the source TTS model. speecht5 uses optimum-cli; kokoro uses a dedicated PyTorch->OpenVINO conversion path.', dest='model_type')
parser_text2speech.add_argument('--vocoder', type=str, help='The vocoder model to use for speecht5. For example microsoft/speecht5_hifigan. Ignored for kokoro.', dest='vocoder')
parser_text2speech.add_argument('--speaker_name', type=str, help='Name of the speaker (speecht5 only; for kokoro all voices from the HF repo are exported).', dest='speaker_name')
parser_text2speech.add_argument('--speaker_path', type=str, help='Path to the speaker.bin file (speecht5 only; for kokoro all voices from the HF repo are exported).', dest='speaker_path')
parser_text2speech.add_argument('--language', type=str, default=None, help='Default language code passed to the calculator (e.g. en-us, zh). Used mainly by kokoro.', dest='language')


parser_speech2text = subparsers.add_parser('speech2text', help='export model for speech2text endpoint')
Expand All @@ -109,13 +111,19 @@ def add_common_arguments(parser):
models_path: "{{model_path}}",
plugin_config: '{ "NUM_STREAMS": "{{num_streams|default(1, true)}}" }',
target_device: "{{target_device|default("CPU", true)}}",
{%- if speaker_name and speaker_path %}
{%- if language %}
language: "{{language}}",
{%- endif %}
{%- if voices %}
voices: [
{%- for v in voices %}
{
name: "{{speaker_name}}",
path: "{{speaker_path}}"
}
]{% endif %}
name: "{{v.name}}",
path: "{{v.path}}"
}{% if not loop.last %},{% endif %}
{%- endfor %}
]
{%- endif %}
}
}
}
Expand Down Expand Up @@ -476,13 +484,42 @@ def export_embeddings_model_ov(model_repository_path, source_model, model_name,
print("Created graph {}".format(os.path.join(model_repository_path, model_name, 'graph.pbtxt')))
add_servable_to_config(config_file_path, model_name, os.path.relpath(os.path.join(model_repository_path, model_name), os.path.dirname(config_file_path)))

def _list_kokoro_voices(destination_path):
"""optimum-cli's Kokoro exporter writes per-voice speaker embeddings to
<destination_path>/voices/<name>.bin. Return the sorted list of voice names."""
voices_dir = os.path.join(destination_path, "voices")
if not os.path.isdir(voices_dir):
print("Warning: no voices/ directory found under", destination_path)
return []
return sorted(Path(p).stem for p in Path(voices_dir).glob("*.bin"))

def export_text2speech_model(model_repository_path, source_model, model_name, precision, task_parameters, config_file_path):
destination_path = os.path.join(model_repository_path, model_name)
print("Exporting text2speech model to ",destination_path)
if not os.path.isdir(destination_path) or args['overwrite_models']:
optimum_command = "optimum-cli export openvino --model {} --weight-format {} --trust-remote-code --model-kwargs \"{{\\\"vocoder\\\": \\\"{}\\\"}}\" {}".format(source_model, precision, task_parameters['vocoder'], destination_path)
if os.system(optimum_command):
raise ValueError("Failed to export text2speech model", source_model)
model_type = task_parameters.get('model_type', 'speecht5')

if model_type == 'kokoro':
# optimum-intel registers Kokoro under library_name=kokoro / task=text-to-audio.
# The kokoro exporter also dumps each speaker embedding to voices/<name>.bin.
if not os.path.isfile(os.path.join(destination_path, 'openvino_model.xml')) or args['overwrite_models']:
optimum_command = "optimum-cli export openvino --model {} --task text-to-audio --weight-format {} {} --trust-remote-code {}".format(
source_model, precision, task_parameters['extra_quantization_params'], destination_path)
print('Running command:', optimum_command)
if os.system(optimum_command):
raise ValueError("Failed to export kokoro model", source_model)
voice_names = _list_kokoro_voices(destination_path)
# Render the graph with every available voice (path is relative to graph.pbtxt).
task_parameters['voices'] = [{'name': n, 'path': f'./voices/{n}.bin'} for n in voice_names]
else:
if not os.path.isdir(destination_path) or args['overwrite_models']:
if not task_parameters.get('vocoder'):
raise ValueError("--vocoder is required when --model_type=speecht5")
optimum_command = "optimum-cli export openvino --model {} --weight-format {} --trust-remote-code --model-kwargs \"{{\\\"vocoder\\\": \\\"{}\\\"}}\" {}".format(source_model, precision, task_parameters['vocoder'], destination_path)
if os.system(optimum_command):
raise ValueError("Failed to export text2speech model", source_model)
if task_parameters.get('speaker_name') and task_parameters.get('speaker_path'):
task_parameters['voices'] = [{'name': task_parameters['speaker_name'], 'path': task_parameters['speaker_path']}]

gtemplate = jinja2.Environment(loader=jinja2.BaseLoader).from_string(t2s_graph_template)
graph_content = gtemplate.render(model_path="./", **task_parameters)
with open(os.path.join(model_repository_path, model_name, 'graph.pbtxt'), 'w') as f:
Expand Down
7 changes: 6 additions & 1 deletion demos/common/export_models/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--extra-index-url "https://download.pytorch.org/whl/cpu"
--extra-index-url "https://storage.openvinotoolkit.org/simple/wheels/nightly"
--extra-index-url "https://storage.openvinotoolkit.org/simple/wheels/pre-release"
optimum-intel@git+https://github.com/huggingface/optimum-intel.git@d4dd21a3aa89c0671d85b704847ac06a378e761c
optimum-intel@git+https://github.com/huggingface/optimum-intel.git@7a109befdfd4f9b94351135b17505efa28698210
accelerate
datasets
diffusers # for image generation
Expand All @@ -14,3 +14,8 @@ sentence_transformers==5.3.0
sentencepiece # Required by: transformers`
torchvision
requests
# Kokoro TTS export (text2speech --model_type kokoro).
# typer must stay <0.12 because kokoro -> misaki -> spacy imports `typer.main`,
# which was removed in typer 0.12.
kokoro==0.9.4
typer<0.12
26 changes: 26 additions & 0 deletions distro.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,29 @@ def distro_flag():
name = "not_ubuntu_build",
negate = ":ubuntu_build",
)

# Controls whether espeak-ng is built from source (via Bazel) and bundled
# into the OVMS release. When "off", no espeak-ng artifacts are produced
# and the runtime will not have phonemization fallback available.
def espeak_flag():
string_flag(
name = "espeak",
values = ["on", "off"],
build_setting_default = "on",
)
native.config_setting(
name = "espeak_on",
flag_values = {
"espeak": "on",
},
)
native.config_setting(
name = "espeak_off",
flag_values = {
"espeak": "off",
},
)
more_selects.config_setting_negation(
name = "not_espeak_on",
negate = ":espeak_on",
)
2 changes: 2 additions & 0 deletions setupvars.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
set "OVMS_DIR=%~dp0"
set "PYTHONHOME=%OVMS_DIR%\python"
set "PATH=%OVMS_DIR%;%PYTHONHOME%;%PYTHONHOME%\Scripts;%PATH%"
:: Point bundled espeak-ng (when packaged) at its data tables.
if exist "%OVMS_DIR%\espeak-ng-data" set "ESPEAK_DATA_PATH=%OVMS_DIR%\espeak-ng-data"
echo "OpenVINO Model Server Environment Initialized"
4 changes: 4 additions & 0 deletions setupvars.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ if (Test-Path "$env:OVMS_DIR\python") {
} else {
$env:PATH="$env:PATH:$env:OVMS_DIR"
}
# Point bundled espeak-ng (when packaged) at its data tables.
if (Test-Path "$env:OVMS_DIR\espeak-ng-data") {
$env:ESPEAK_DATA_PATH="$env:OVMS_DIR\espeak-ng-data"
}
echo "OpenVINO Model Server Environment Initialized"
6 changes: 6 additions & 0 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2287,6 +2287,12 @@ cc_binary(
"//src/python/binding:pyovms.so",
],
"//:disable_python": []
}) + select({
"//:espeak_on": [
"//third_party:espeak_ng",
"//third_party:espeak_ng_data",
],
"//:espeak_off": [],
}),
# linkstatic = False, # Use for dynamic linking when necessary
)
Expand Down
Loading