Skip to content

Conversation

@michalkulakowski
Copy link
Collaborator

🛠 Summary

JIRA/Issue if applicable.
Describe the changes.

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

@michalkulakowski michalkulakowski changed the title Add speaker ambeddings support Add speaker embeddings support Dec 11, 2025
@michalkulakowski michalkulakowski force-pushed the mkulakow/support_voice_embeddings branch from ec35a1a to 4f45830 Compare January 12, 2026 12:32
@dtrawins
Copy link
Collaborator

Can you include the unit tests?

TtsServable(const mediapipe::T2sCalculatorOptions& nodeOptions, const std::string& graphPath) {
auto fsModelsPath = std::filesystem::path(nodeOptions.models_path());
TtsServable(const std::string& modelDir, const std::string& targetDevice, const google::protobuf::RepeatedPtrField<mediapipe::T2sCalculatorOptions_SpeakerEmbeddings>& graphVoices, const std::string& pluginConfig, const std::string& graphPath) {
auto fsModelsPath = std::filesystem::path(modelDir);
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you move this constructor to cpp? this way you could move read_speaker_embedding to cpp as well.

input.seekg(0, std::ios::beg);

// Check size is multiple of float
OPENVINO_ASSERT(buffer_size % sizeof(float) == 0, "File size is not a multiple of float size.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think it might be the first time we use openvino_assert
why are we introducing yet another way of reporting errors?
for now we have:

  • ovms::Status
  • absl::Status
  • std::variant<Obj, std::string(error)>
  • and now this... :(

for (auto voice : graphVoices) {
if (!std::filesystem::exists(voice.path()))
throw std::runtime_error{"Requested voice speaker embeddings file does not exist."};
voices[voice.name()] = read_speaker_embedding(voice.path());
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we catch exceptions thrown inside read_speaker_embedding?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants