Some checks failed
Linux Build / Linux cpu (push) Has been cancelled
Linux Build / Linux cpu-clang (push) Has been cancelled
Linux Build / Linux vulkan (push) Has been cancelled
mac-build / macOS CPU (push) Has been cancelled
Nix Build / Nix (cpu) (push) Has been cancelled
Nix Build / Nix (vulkan) (push) Has been cancelled
windows-build / Windows CPU (push) Has been cancelled
26 lines
735 B
C++
26 lines
735 B
C++
#pragma once
|
|
|
|
#include <string_view>
|
|
|
|
namespace minitts::server {
|
|
|
|
struct NeutralSpeechOptionRule {
|
|
std::string_view name;
|
|
double value;
|
|
};
|
|
|
|
// Top-level OpenAI speech compatibility exceptions: these neutral values behave
|
|
// like an omitted field, even when the model does not support the option.
|
|
// Check after value validation and alias normalization, before model forwarding.
|
|
inline constexpr NeutralSpeechOptionRule kNeutralSpeechOptions[] = {
|
|
{"speed", 1.0},
|
|
};
|
|
|
|
inline bool is_neutral_speech_option(std::string_view name, double value) {
|
|
for (const auto & rule : kNeutralSpeechOptions) {
|
|
if (rule.name == name && rule.value == value) return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
} // namespace minitts::server
|