mirror of
https://github.com/pstrueb/piper.git
synced 2026-04-26 01:34:50 +00:00
Clean up and fix append
This commit is contained in:
@@ -117,7 +117,8 @@ int main(int argc, char *argv[]) {
|
||||
GetModuleFileNameW(nullptr, moduleFileName, std::size(moduleFileName));
|
||||
return filesystem::path(moduleFileName);
|
||||
}();
|
||||
#elifdef __APPLE__
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
auto exePath = []() {
|
||||
char moduleFileName[PATH_MAX] = {0};
|
||||
uint32_t moduleFileNameSize = std::size(moduleFileName);
|
||||
@@ -126,6 +127,7 @@ int main(int argc, char *argv[]) {
|
||||
}();
|
||||
#else
|
||||
auto exePath = filesystem::canonical("/proc/self/exe");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (voice.phonemizeConfig.phonemeType == piper::eSpeakPhonemes) {
|
||||
|
||||
@@ -482,7 +482,7 @@ void textToAudio(PiperConfig &config, Voice &voice, std::string text,
|
||||
// DEBUG log for phonemes
|
||||
std::string phonemesStr;
|
||||
for (auto phoneme : sentencePhonemes) {
|
||||
utf8::append(phoneme, &phonemesStr);
|
||||
utf8::append(phoneme, std::back_inserter(phonemesStr));
|
||||
}
|
||||
|
||||
spdlog::debug("Converting {} phoneme(s) to ids: {}",
|
||||
@@ -596,7 +596,7 @@ void textToAudio(PiperConfig &config, Voice &voice, std::string text,
|
||||
|
||||
for (auto phonemeCount : missingPhonemes) {
|
||||
std::string phonemeStr;
|
||||
utf8::append(phonemeCount.first, &phonemeStr);
|
||||
utf8::append(phonemeCount.first, std::back_inserter(phonemeStr));
|
||||
spdlog::warn("Missing \"{}\" (\\u{:04X}): {} time(s)", phonemeStr,
|
||||
(uint32_t)phonemeCount.first, phonemeCount.second);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user