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

*** -[NSURL initFileURLWithPath:]: nil string parameter #8

Open
jasonkneen opened this issue May 23, 2018 · 2 comments
Open

*** -[NSURL initFileURLWithPath:]: nil string parameter #8

jasonkneen opened this issue May 23, 2018 · 2 comments

Comments

@jasonkneen
Copy link

Unable to use recognition based on an existing file. Whatever the file URL is set to I get:

*** -[NSURL initFileURLWithPath:]: nil string parameter

Have Tried:

  • /samples/mpthreetest.mp3
  • the nativePath to it
  • a remote HTTP file

all fail with the same error.

@jasonkneen
Copy link
Author

seems local file works, but can't use it with nativePath or a remote URL so

file:///Users/jkneen/Library/Developer/CoreSimulator/Devices/DF3E928C-1CD8-4DEA-9E5B-37272E8B5900/data/Containers/Data/Application/0DDC2CD8-574E-47C6-9EA6-FFA7037DECBE/tmp/85E7.mp4

fails with that error.

@jasonkneen
Copy link
Author

OK got it, so it's type is URL but it's doing additional stuff to it in the module. If you pass a complete URL it needs to be:

soundURL = NSURL.URLWithString(args.url);

not

NSURL.fileURLWithPath

So suggest we have 3 types:

var SOURCE_TYPE_URL = 'url';
var SOURCE_TYPE_MICROPHONE = 'microphone';
var SOURCE_TYPE_FILENAME = 'filename';

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

1 participant