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

keytap2 crashes on ubuntu 18.04 #6

Closed
informatimago opened this issue Nov 30, 2018 · 1 comment
Closed

keytap2 crashes on ubuntu 18.04 #6

informatimago opened this issue Nov 30, 2018 · 1 comment

Comments

@informatimago
Copy link


[pjb@L0253344 :0 build]$ ./record record.kbd
Recording 5 frames per key press
Found 1 capture devices:
    - Capture device #0: 'Built-in Audio Analog Stereo'
Opened capture device 2
    Frequency:  24000
    Format:     33056 (4 bytes)
    Channels:   1
    Samples:    512

Last recorded key -  10 '[enter]'. Total times recorded so far -   1. Total data saved: 0.00976562 MB
  C-c C-c
[pjb@L0253344 :0 build]$ ./keytap2 record.kbd 
Usage: ./keytap2 record.kbd
[+] Loading recording from 'record.kbd'
[+] Loaded recording: of 2562 samples (sample size = 4 bytes)
    Size in memory:          0.00977325 MB
    Sample size:             4
    Total number of samples: 2562
    Recording length:        0.10675 seconds
[+] Searching for key presses
[+] Detected a total of 0 potential key presses
[+] Search took 0.000 seconds
[+] Calculating CC similarity map
[+] Calculation took 0.000 seconds
   -1 
--------------------------------------------------------------------------------------------------------------------------------------

[+] Top 10 pairs
Segmentation fault (core dumped)
[pjb@L0253344 :0 build]$ 
[pjb@L0253344 :0 build]$ coredumpctl dump    25539 > keytap2.core
           PID: 25539 (keytap2)
           UID: 1000 (pjb)
           GID: 1000 (pjb)
        Signal: 11 (SEGV)
     Timestamp: Fri 2018-11-30 14:25:40 CET (2min 43s ago)
  Command Line: ./keytap2 record.kbd
    Executable: /home/pjb/src/kbd-audio/build/keytap2
 Control Group: /user.slice/user-1000.slice/session-2.scope
          Unit: session-2.scope
         Slice: user-1000.slice
       Session: 2
     Owner UID: 1000 (pjb)
       Boot ID: 01b5433ca7d64ffebbb9631c12690f2c
    Machine ID: 3c990c4b0b06406caa7241e23025e717
      Hostname: L0253344
       Storage: /var/lib/systemd/coredump/core.keytap2.1000.01b5433ca7d64ffebbb9631c12690f2c.25539.1543584340000000.lz4
       Message: Process 25539 (keytap2) of user 1000 dumped core.
                
                Stack trace of thread 25539:
                #0  0x000055665c312020 n/a (/home/pjb/src/kbd-audio/build/keytap2)

keytap2.core.xz.base64.txt

@ggerganov
Copy link
Owner

Keep in mind that 'keytap2' and 'keytap2-gui' are still in development stage and problems can be expected. Will be providing more info on those soon.

Other than that:

  1. Use the 'record-full' tool instead of 'record' to capture the recording. This is what 'keytap2' expects.

  2. The line saying:

    [+] Detected a total of 0 potential key presses

means that the keypress detection algorithm didn't detect any peaks in the recording. Make sure your mic level is turned to the max and is able to capture the sound from the keys. You can verify this by replaying the recording with:

./play-full record.kbd

If you hear distinct keypresses then you should be fine.

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