-
Notifications
You must be signed in to change notification settings - Fork 236
Add speaker embeddings support #3855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ec35a1a to
4f45830
Compare
|
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); |
There was a problem hiding this comment.
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."); |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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?
🛠 Summary
JIRA/Issue if applicable.
Describe the changes.
🧪 Checklist
``