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

Device detection bug. #32

Closed
p-groarke opened this issue May 16, 2024 · 3 comments
Closed

Device detection bug. #32

p-groarke opened this issue May 16, 2024 · 3 comments

Comments

@p-groarke
Copy link
Owner

Report :

There's one peculiar issue. In my test version, with everything local to
my exe everything worked like a charm. Now that the speech & sound module
is completely rewritten from using MS SAPI, and then Sox (
https://sourceforge.net/projects/sox/) to apply filters, I moved this
module over to Codeblocks. After further editing of my code wsay suddenly
stopped working. It gave exit code -1073740791.

According to chatGPT: "An exit code of -1073740791 in Windows typically
corresponds to the hexadecimal value 0xC0000409, which indicates an
"Unknown Exception" or "STATUS_STACK_BUFFER_OVERRUN".

Testing further, I found that it only happens when starting wsay from a
subfolder (in the user %AppData% folder)
I was intending to use in release
versions. The idea is to have my main program run in a working directory
with subfolders like bin, data, sound, etc.

Running it from the command line I got this :

*C:\Users\Ivan\AppData\LocalLow\Icarus\ReVoice\bin>wsay "test"Couldn't
detect default audio device, using first.Please report this so I can
improve default device detection,
ty!C:\Users\Ivan\AppData\LocalLow\Icarus\ReVoice\bin>wsay -l1 : Microsoft
Hazel Desktop - English (Great Britain)2 : Microsoft David Desktop -
English (United States)3 : Microsoft Zira Desktop - English (United
States)4 : Microsoft James - English (Australia)5 : Microsoft Catherine -
English (Australia)6 : Microsoft Linda - English (Canada)7 : Microsoft
Richard - English (Canada)8 : Microsoft George - English (United Kingdom)9
: Microsoft Hazel - English (United Kingdom)10 : Microsoft Susan - English
(United Kingdom)11 : Microsoft Sean - English (Ireland)12 : Microsoft David
- English (United States)13 : Microsoft Mark - English (United States)14 :
Microsoft Zira - English (United States)15 : Microsoft Bart - Dutch
(Belgium)16 : Microsoft Frank - Dutch (Netherlands)17 : Microsoft Matilda -
English (Australia)18 : Microsoft Eva - English (Canada)19 : Microsoft Eva
- English (United States)Couldn't detect default audio device, using
first.Please report this so I can improve default device detection, ty!*

So it may be Windows related, maybe it doesn't like executables being there
? Anyway I can work around that and place wsay.exe in "Program Files" or a
bin folder in the user's home directory and use that AppData subfolder as a
working directory. However, in the long run, for compability and a clean
setup it might be better to have wsay in that AppData/../ReVoice/bin folder.

@p-groarke p-groarke mentioned this issue May 16, 2024
@p-groarke
Copy link
Owner Author

p-groarke commented May 17, 2024

@IvanScheers Was able to repro :)

The problem is actually a permission's issue. You can't enumerate the audio playback devices from LocalLow, at least not without futzing around with permissions.

Instead, you can put your files in Local (Local\Icarus\ReVoice\bin). Which is the expected location anyways (LocalLow is for web "safe mode" things from what I could find). That should fix your issue. I'll add a better warning in the future whenever no devices are detected.

Thx again for reporting this, keep em coming! XD

@IvanScheers
Copy link

IvanScheers commented May 17, 2024 via email

@p-groarke
Copy link
Owner Author

Ugh antivirus false-positives -___- Microsoft enabled machine learning on Windows 11 and there's not one release of mine it won't false detect. I have to send every wsay update in to microsoft for analysis.

Had never heard of nim, looks interesting. Sucks to have to port like that :( But I'm glad my little tool is saving you some time. Take care!

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

No branches or pull requests

2 participants