papoteur-mga / elograf

Utility for launching and configuring nerd-dictation
GNU General Public License v3.0
57 stars 4 forks source link

Failed to transcript voice #13

Open codingnooob opened 11 months ago

codingnooob commented 11 months ago

Every time I start and stop dictation (by clicking the icon), nothing happens. Doing the same from elograf started in the terminal, I get this:

No text found in the audio
Traceback (most recent call last):
  File "/home/<user>/.local/bin/nerd-dictation", line 1974, in <module>
    main()
  File "/home/<user>/.local/bin/nerd-dictation", line 1970, in main
    args.func(args)
  File "/home/<user>/.local/bin/nerd-dictation", line 1875, in <lambda>
    func=lambda args: main_end(
  File "/home/<user>/.local/bin/nerd-dictation", line 1469, in main_end
    main_suspend(path_to_cookie=path_to_cookie, suspend=False, verbose=0)
  File "/home/<user>/.local/bin/nerd-dictation", line 1515, in main_suspend
    os.kill(pid, signal.SIGCONT)
ProcessLookupError: [Errno 3] No such process
papoteur-mga commented 11 months ago

Hello, The error you report is in the process of execution nerd-dictation stop. It seems however that nerd-dictation was already stopped, as the previous message says: No text found in the audio , Do you use a big model? Is the icon changing at each step of clicking the button? Do you leave time between clicks (more than 10 seconds) or are you quick? No text found in the audio says that there is no audio coming or you stop without saying anything since the launch.

codingnooob commented 11 months ago

I tried with three models (vosk-model-en-us-0.42-gigaspeech, manually locally installed; vosk-model-en-us-0.22, globally installed with elograf installer; vosk-model-small-en-us-0.15, globally installed with elograf installer). The issue occurred with all three. Each time I left ~15 seconds between start and stop clicks.

The icon is changing with every click. However, the No text found in the audio message only appeared after the first stop. On every subsequent stop, only the traceback message was printed to the terminal.

Here's what pactl info outputs just in case it helps (forgot to do this last time):

Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 350
Tile Size: 65472
User Name: <user>
Host Name: <user>-MacBookPro
Server Name: PulseAudio (on PipeWire 0.3.79)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_e6_00.3.Speakers
Default Source: effect_output.filter-chain-mic
Cookie: <cookie>

Please let me know if you need more information to diagnose this issue

papoteur-mga commented 11 months ago

Hello, I don't reproduce the problem. You can launch elograf from a console in debug mode, to add verbosity:

elograf -l debug &
[1] 266618
DEBUG:root:Commute dictation on
DEBUG:root:Start dictation with model vosk-model-fr located in /home/yves/.config/vosk-models/vosk-model-fr-0.22
DEBUG:root:Starting nerd-dictation with the command nerd-dictation begin --idle-time=0.21 --punctuate-from-previous-timeout=5 --vosk-model-dir=/home/yves/.config/vosk-models/vosk-model-fr-0.22 --output=SIMULATE_INPUT --continuous
DEBUG:root:Commute dictation off
DEBUG:root:Stopping nerd-dictation
No text found in the audio
DEBUG:root:Stopping nerd-dictation

You can then catch the command used to launch nerd-dictation and use it directly to see if the problem comes from there.

papoteur-mga commented 11 months ago

Without information, there is nothing I can do. Thus closing. Reopen if you can provide more information.

ChildishGiant commented 8 months ago

Here's my verbose output from starting and stopping it twice. The difference for me is that it seems to mainly work, other than a weird icon, error and never stopping using remote interactions.

[als@fedora ~]$ elograf -l debug &
[1] 45578
[als@fedora ~]$ DEBUG:root:Commute dictation on
DEBUG:root:Start dictation with model model located in /home/als/.config/nerd-dictation/model
DEBUG:root:Starting nerd-dictation with the command nerd-dictation begin --idle-time=0.1 --vosk-model-dir=/home/als/.config/nerd-dictation/model --output=SIMULATE_INPUT --continuous
DEBUG:root:Stop dictation
DEBUG:root:Stopping nerd-dictation
DEBUG:root:Stopping nerd-dictation
Traceback (most recent call last):
  File "/usr/local/bin/nerd-dictation", line 1973, in <module>
    main()
  File "/usr/local/bin/nerd-dictation", line 1969, in main
    args.func(args)
  File "/usr/local/bin/nerd-dictation", line 1874, in <lambda>
    func=lambda args: main_end(
  File "/usr/local/bin/nerd-dictation", line 1468, in main_end
    main_suspend(path_to_cookie=path_to_cookie, suspend=False, verbose=0)
  File "/usr/local/bin/nerd-dictation", line 1514, in main_suspend
    os.kill(pid, signal.SIGCONT)
ProcessLookupError: [Errno 3] No such process
DEBUG:root:Start dictation
DEBUG:root:Start dictation with model model located in /home/als/.config/nerd-dictation/model
DEBUG:root:Starting nerd-dictation with the command nerd-dictation begin --idle-time=0.1 --vosk-model-dir=/home/als/.config/nerd-dictation/model --output=SIMULATE_INPUT --continuous
DEBUG:root:Stop dictation
DEBUG:root:Stopping nerd-dictation
DEBUG:root:Stopping nerd-dictation
Traceback (most recent call last):
  File "/usr/local/bin/nerd-dictation", line 1973, in <module>
    main()
  File "/usr/local/bin/nerd-dictation", line 1969, in main
    args.func(args)
  File "/usr/local/bin/nerd-dictation", line 1874, in <lambda>
    func=lambda args: main_end(
  File "/usr/local/bin/nerd-dictation", line 1468, in main_end
    main_suspend(path_to_cookie=path_to_cookie, suspend=False, verbose=0)
  File "/usr/local/bin/nerd-dictation", line 1514, in main_suspend
    os.kill(pid, signal.SIGCONT)
ProcessLookupError: [Errno 3] No such process

Once it stopped it ends in an odd limbo place due to this error but I am able to start it again. image

My system info ``` als@fedora ---------- OS: Fedora Linux 39 (Workstation Edition) x86_64 Kernel: 6.6.7-200.fc39.x86_64 Uptime: 5 hours Packages: 3363 (rpm), 176 (flatpak) Shell: bash 5.2.21 Resolution: 1920x1080 DE: GNOME 45.2 WM: Mutter WM Theme: Dracula Theme: Adwaita-dark [GTK2/3] Icons: Adwaita [GTK2/3] Terminal: gnome-terminal CPU: AMD Ryzen 5 1600X (12) @ 3.600GHz GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590 Memory: 8319MiB / 15917MiB ```
papoteur-mga commented 8 months ago

@ChildishGiant I see that you use Gnome. Is it a Wayland session? I this case, you would have to use DOTOOL as keyboard simulator, but I think it is not yet available in Fedora. As you can only use xdotool, you have to use X11 session for having it to work. The trace doesn't cause harm. I have fixed it in the Qt5 branch, but not yet reported changes in master (Qt6). Does this command run fine? nerd-dictation begin --idle-time=0.1 --vosk-model-dir=/home/als/.config/nerd-dictation/model --output=SIMULATE_INPUT --continuous

ChildishGiant commented 8 months ago

The command you gave seemed to run without a hitch 🤷🏻‍♀️ Yeah I'm on wayland as that's what Fedora 39 ships with. Keyboard input all seems to work using the "remote interaction" remote desktop popup and I don't have issues with it.

papoteur-mga commented 8 months ago

I'm not sure to well understand. All is fine? Except elograf? I have reported latest modifications from Qt5 branch to master branch. Is it better with it ?