Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.8k stars 1.83k forks source link

Embedded model fails to load from paths with non-ASCII characters #2288

Open bpasero opened 6 months ago

bpasero commented 6 months ago

IN ORDER TO ASSIST YOU, PLEASE PROVIDE THE FOLLOWING:

log.txt

// the path below needs to exist on disk and needs to contain spaces and non-ASCII characters
auto speechConfig = EmbeddedSpeechConfig::FromPath("/Users/bpasero/Desktop/assets sind cööl/stt");

Describe the bug

The embedded speech model fails to load STT models when the path contains non-ASCII characters and spaces.

To Reproduce

Steps to reproduce the behavior:

// the path below needs to exist on disk and needs to contain spaces and non-ASCII characters
auto speechConfig = EmbeddedSpeechConfig::FromPath("/Users/bpasero/Desktop/assets sind cööl/stt");

Expected behavior

Models can load from paths with spaces and non-ASCII characters.

Version of the Cognitive Services Speech SDK

1.35.0

Platform, Operating System, and Programming Language

Additional context

Reported in https://github.com/microsoft/vscode/issues/206512

pankopon commented 6 months ago

This is generally the same with all SDK file access at the moment, including log files.

github-actions[bot] commented 5 months ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.

bpasero commented 5 months ago

This seems to be an acknowledged bug!

pankopon commented 5 months ago

@bpasero File paths with non-ASCII characters are not supported in the current SDK implementation, whether it's about embedded speech models, KWS models or log files. This is for future enchancement, no ETA yet.

bpasero commented 5 months ago

@pankopon understood. note that VS Code users can be impacted as soon as their usernames in the OS contains non-ASCII characters because we store VS Code extensions in the user-home directory, which typically includes the username verbatim. The Azure Speech model will be loaded directly from said extensions folder.

Would be great to see a fix for this eventually as there is no real workaround for people impacted 👍

bpasero commented 5 months ago

Hm, I wonder if a workaround could be to load the model with a relative file path? I have not tried that so far, but that could certainly help address this issue for our users.

pankopon commented 5 months ago

@bpasero It depends on what the working directory of the process that uses the Speech SDK is. The model path would need to be relative to this. If both the process working directory and the model location are under the user's home directory then a relative path could work.

github-actions[bot] commented 4 months ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.

bpasero commented 4 months ago

Please fix it :-)

github-actions[bot] commented 3 months ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.

bpasero commented 3 months ago

Still an issue.

github-actions[bot] commented 3 months ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.

bpasero commented 3 months ago

Still an issue.