Skip to content
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

Add speech synthesis support #2206

Merged
merged 2 commits into from Apr 1, 2021
Merged

Add speech synthesis support #2206

merged 2 commits into from Apr 1, 2021

Conversation

vitaut
Copy link
Contributor

@vitaut vitaut commented Apr 1, 2021

Add speech synthesis support to {fmt}.

For example:

#include <fmt/os.h>

int main() {
  fmt::say(
    R"SHANTY(
    There [[emph +]] once was a pen that [[emph +]] put to [[emph +]] paper,
    It [[emph -]] was [[emph +]] gonna be written [[emph +]] sooner or later,
    Ctrl-S went down, the proposal sent out,
    Vote [[emph +]] down my committee vote [[emph +]] down.

    [[emph +]] Soon, may the Unicode come,
    So [[emph +]] we can write aleph and [[emph +]] xĭ and [[emph +]] từng,
    One day when '23 is done,
    We'll take our bom and go.)SHANTY");
}

Output:

say3.mov

@vitaut vitaut force-pushed the os branch 3 times, most recently from 660c3e5 to 5900df9 Compare April 1, 2021 15:55
@tigerw
Copy link

tigerw commented Apr 11, 2021

The best kind of feature creep. 3D text render output when

@vitaut
Copy link
Contributor Author

vitaut commented Apr 12, 2021

3D text render output when

PRs are welcome (not).

@rcombs
Copy link

rcombs commented Jul 20, 2021

In all seriousness, I don't think this is a great idea to have in the library as-is, since it might not be obvious to users that this isn't safe to pass arbitrary input to, nor that it's highly non-portable (say only exists on macOS).

It'd be safer to at least use FILE* f = popen("say", "w"); and fmt::print(f, format_str, args…);.

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.

None yet

3 participants