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

keytap doesn't collect training data #51

Open
yurivict opened this issue Jan 15, 2023 · 1 comment
Open

keytap doesn't collect training data #51

yurivict opened this issue Jan 15, 2023 · 1 comment

Comments

@yurivict
Copy link

On FreeBSD keytap immediately goes to the "[+] Predicting" line:

$ work/.build/keytap -c3 -C2
Usage: work/.build/keytap input.kbd [input2.kbd ...] [-cN] [-pF] [-tF]
-cN - select capture device N
-CN - select number N of capture channels to use
-pF - prediction threshold: CC > F
-tF - background threshold: ampl > F*avg_background

Found 4 capture devices:
- Capture device #0: '/dev/dsp'
- Capture device #1: '/dev/dsp3'
- Capture device #2: '/dev/dsp4'
- Capture device #3: '/dev/dsp7'
Attempt to open capture device 3 : '/dev/dsp7' ...
Opened capture device succesfully!
DeviceId: 2
Frequency: 16000
Format: 33056 (4 bytes)
Channels: 2
Samples: 512
Audio Filter: 1
Cutoff frequency: 100 Hz
Capturing audio ..
[+] Collecting training data
[+] Training
Failed to train the following keys:
[+] Ready to predict. Keep pressing keys and the program will guess which key was pressed
based on the captured audio from the microphone.
[+] Predicting


It doesn't seem to collect any training data.
@ggerganov
Copy link
Owner

You need to first collect training data using the record tool.
For example:

./record train.kbd -c3

Press each key that you want to predict at least 3 times.

After that, use the generated train.kbd file with keytap or keytap-gui like this:

./keytap train.kbd
./keytap-gui train.kbd

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