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

dtk-generic say conflicts with macOS say #926

Open
mohd-akram opened this issue May 24, 2024 · 6 comments
Open

dtk-generic say conflicts with macOS say #926

mohd-akram opened this issue May 24, 2024 · 6 comments
Labels

Comments

@mohd-akram
Copy link
Contributor

Steps to reproduce

Use spd-say on macOS

Obtained behavior

Incorrectly uses macOS say as DECTalk say causing a file name to be spoken.

Presumably the GenericCmdDependency can be used to verify if this is DECTalk say.

Expected behavior

Uses dtk-generic output module only if say binary is from DECTalk.

Even better, have a generic macOS say module and use that if it's available :D

@sthibaul
Copy link
Collaborator

Incorrectly uses macOS say as DECTalk say causing a file name to be spoken.

Oops... Where is say coming from on macOS exactly?

@mohd-akram
Copy link
Contributor Author

It's in /usr/bin/say, it comes with macOS.

@sthibaul
Copy link
Collaborator

It's in /usr/bin/say

Uh, so it's not trivially distinguishable from DECTalk's... Does say -h report something useful to distinguish them?

@mohd-akram
Copy link
Contributor Author

Potentially we could use the -e and -s flags in DECtalk say as they're not present in macOS say: echo | say -e 1 -s 1 succeeds only with DECtalk.

say -h:

say: invalid option -- h
Usage: say [-v voice] [-o out] [-f in | message]

and the full supported flags from the man page:

say [-v voice] [-r rate] [-o outfile [audio format options] | -n name:port | -a device] [-f file | string ...]

DECtalk say:

Usage: say [-h] [-s #] [-r #] [-d #] [-fo file] [-a "<text>"] [-fi file]

@sthibaul
Copy link
Collaborator

sthibaul commented May 29, 2024

echo | say -e 1 -s 1 succeeds only with DECtalk.

But there's no guarantee that it will never work someday with MacOS. I'd rather use -h and check for MME server in the output

@sthibaul sthibaul removed the needinfo label May 29, 2024
@mohd-akram
Copy link
Contributor Author

mohd-akram commented Jun 1, 2024

IMO both are a bit too fragile - I figured two flags would be safe enough (-d 0 could also be added). They've been making updates to that DECtalk version on GitHub so the message might change (I'm pretty sure MME is for the obsolete Tru64). Maybe dtmemory.wav? I think that's the only DECtalk specific thing in the whole message, and it's related to existing functionality so unlikely to change.

I think a check for dtmemory would be good enough. There's a dtmemory program that comes with DECtalk too. Note that when I added DECtalk to MacPorts I renamed the binary dtsay. If there's some way to fallback to that, that would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants