From 15c10b0c666d274b378cf63429babfa202623db4 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 1 Apr 2021 07:50:40 -0700 Subject: [PATCH] Add speech synthesis support --- include/fmt/os.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/fmt/os.h b/include/fmt/os.h index 680ada4c..3127b9b0 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -200,6 +200,11 @@ FMT_API void report_windows_error(int error_code, string_view message) FMT_NOEXCEPT; #endif // _WIN32 +template > +void say(const S& format_str, Args&&... args) { + std::system(format("say \"{}\"", format(format_str, args...)).c_str()); +} + // A buffered file. class buffered_file { private: