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

Set up the path of "res" #114

Open
b4zz4 opened this issue Jun 19, 2022 · 5 comments
Open

Set up the path of "res" #114

b4zz4 opened this issue Jun 19, 2022 · 5 comments

Comments

@b4zz4
Copy link

b4zz4 commented Jun 19, 2022

I have trouble creating the arch package.

Simple make:

cd build
cmake ..
make rhubarb

For example:

rhubarb -o output.txt audio.wav 

I don't know how to correctly configure the path to "res/":
[Error] "acmod.c", line 82: Folder '/usr/local/bin/res/sphinx/acoustic-model' does not contain acoustic model definition 'mdef'

@DanielSWolf
Copy link
Owner

Rhubarb requires a number of resource files. It looks for them in a res directory which must be in the same directory as the rhubarb executable.

Judging by the error message, the rhubarb executable is in /usr/local/bin. Is that correct? If so, how did you create it there? Is it a copy, a symlink, or a hard link to the actual file?

@b4zz4
Copy link
Author

b4zz4 commented Jun 21, 2022

Isn't there a way to configure that PATH during the compilation?

@DanielSWolf
Copy link
Owner

No. Why would you hard-code a file path in a binary?

Judging by the error message, the rhubarb executable is in /usr/local/bin. Is that correct? If so, how did you create it there? Is it a copy, a symlink, or a hard link to the actual file?

@b4zz4
Copy link
Author

b4zz4 commented Jun 21, 2022

Sorry for my English.

But, I think the models should be in share, but it looks for them in "/usr/local/bin/res/sphinx/acoustic-model".
I don't know how to change this during the compilation.

@DanielSWolf
Copy link
Owner

"Compilation" is the act of taking source code and creating a binary executable file. This executable file should then be able to run from any directory and on any machine with a matching operating system. So hard-coding a path during compilation is just plain wrong.

After compilation, the next step is deployment. That's the act of taking the executable file and any other required files and copying them to a directory where you can then run them. Deployment is machine-specific.

It seems to me that you're confusing these two concepts.

Why does the executable end up in your /usr/local/bin directory? After compilation, it should reside in a subdirectory of build within the source code repository. It seems to me that you're performing some kind of local deployment that goes wrong.

BTW, why do you build using make? The expected calls should look something like this:

cmake .. -G Xcode
cmake --build . --config Release --target package

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