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

Voice2json #11

Merged
merged 6 commits into from
Jan 9, 2023
Merged

Voice2json #11

merged 6 commits into from
Jan 9, 2023

Conversation

cbaoth
Copy link

@cbaoth cbaoth commented Dec 16, 2022

A quick hack to get the new voice2json engine running on a cloud machine that doesn't support Docker (no virtualization, meaning no wsl2/hyper-v docker setup possible).

Not sure if my usecase is a rare corner case, but maybe a final version could support this scenario somehow. The setup is rather simple, assuming a (default bash) WSL1 ubuntu installation exists.

wget https://github.com/synesthesiam/voice2json/releases/download/v2.1/voice2json_2.1_amd64.deb
sudo apt install ./voice2json_2.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
sudo apt install ./libffi6_3.2.1-8_amd64.deb

I added a config parameter to switch between docker and bash mode. I didn't test the docker scenario but it should work as before and its still the default if not specifically disabled.

@cbaoth
Copy link
Author

cbaoth commented Dec 17, 2022

  • I guess all shell commands can easily be consolidated (exec -i dsn_voice2json -c vs bash -c / wsl ...), but I didn't want to mess around with the docker ones since I currently can't test it (in-game) and I didn't want to invest too much time (alpha, just wanted to play around, not sure you even want to support this scenario). Some things to consider for consolidation:
    • In case voice2json is in the docker image's PATH, /usr/lib/voice2json/bin/ could be ommited (same as in non-docker scenario).
    • A ternary UseDocker() ? "exec dsn_voice2json sh -c" : "bash -c" or similar could be used, making the rest of the commands identical for both scenarios.
    • find over ls is not really necessary, I just playde around initially and left the last working version. A simple alternative, that wouldn't put a (to my knowledge unnecessary) link into the parent folder, but would fail in case there are no sub-folders (shouldn't be the case after sucessfull intial download/training), would be: for d in ~/.local/share/voice2json/*/; do.
  • Not sure if my removal of * 100 was correct/appropriate, but as far as I can tell the json contains a decemal percentage value (1 for 100%), if so my change is correct since the conditions below would otherwise always be true (e.g. 100 >= 0.7). But I didn't investigate further and my confidence seemed to be 1 all the time.
  • Sorry my auto formatter removed some trailing spaces, I can roll it back if necessary.

@SwimmingTiger
Copy link
Collaborator

I haven't played Skyrim lately, so I just saw this PR now.
I think it's good to add more options, I'll merge this PR.

@SwimmingTiger SwimmingTiger merged commit 7677bd7 into YihaoPeng:voice2json Jan 9, 2023
@SwimmingTiger
Copy link
Collaborator

A new build with this PR has been released.

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

Successfully merging this pull request may close these issues.

2 participants