Commit Graph
124 Commits
Author SHA1 Message Date
yusufipek d0c93e5a17 Let a stalled apt mirror fail the job rather than hold it
Both Linux test jobs on this branch sat an hour in apt-get, on runners
where the same step takes seconds, and a job with nothing to time it out
holds the pull request red-free and unfinished until the six hour limit.
Three retries and a twenty second timeout give apt another mirror, and
five minutes on the step gives the job an end.
2026-08-19 12:36:16 +03:00
yusufipek 29643f26b3 Keep the two Windows executables from being one file
Windows matches a filename without regard to its case, so Dikte.exe and
dikte.exe were one file in the installation directory: PyInstaller wrote
the console build second and that is the only one that landed. Every
launcher then opened a console window behind the tray, and closing it
killed the application.

The console one is dikte-cli.exe now, which the setup's shim names. The
build reads the PE subsystem of both afterwards, since a filesystem that
keeps the two names apart is exactly what the check would run on
otherwise.
2026-08-19 11:11:30 +03:00
yusufipek 23d56acfb5 Publish a Windows setup beside the AppImage and the disk image
The releases page had nothing for Windows, so the only way in was a
checkout, a Python and a pip install. What goes out now is one setup
program per release: PyInstaller's directory, the pinned ffmpeg the
disk image already uses, and Inno Setup around both. It installs for
the account alone, so no administrator is asked for.

Two executables over the one program there, because a windowed one on
Windows has no standard output at all: Dikte.exe for the Start Menu and
dikte.exe for the terminal, sharing everything they carry. The icon is
drawn by Dikte itself into an .ico, the way the Mac's .icns and Linux's
PNGs already are, so there is still no image file in the repository.

Starting at sign-in is a registry value rather than a Startup shortcut,
which is what lets the setup program, the uninstaller and
`dikte integrate` all mean the same thing: the wizard asks once, and
typing the command changes the answer later.

The three builds move into build.yml, which release.yml now calls
instead of holding its own copy, and which a pull request touching the
packaging runs on its own. A broken build is then a red pull request
rather than a failed release.
2026-08-18 16:08:47 +03:00
Yusuf İpek d24da7df52 Merge pull request #44 from benfirad/agent/remove-integration-wrapper
Remove macOS command wrapper during integration cleanup
2026-08-18 15:40:47 +03:00
Yusuf İpek e7e30a31dd Merge pull request #30 from huseyin-emre-tigci/windows-support
Add Windows support
Co-authored-by: Hüseyin Emre Tığcı <[email protected]>
2026-08-18 15:00:07 +03:00
huseyin-emre-tigciandClaude Fable 5 11a4058e16 Let the device listing match ffmpeg 8's bracket prefix
The dshow parser pinned the bracketed prefix to the `[dshow @ ...]` the
older builds print, and ffmpeg 8 writes `[in#0 @ ...]` there instead: on a
current install every line fell through the anchors, the device list came
back empty, and a dictation with no microphone picked could not start at
all. The prefix is now any bracketed tag, which the anchors and the quoted
name still keep apart from the error lines. Pinned with a listing taken
verbatim from ffmpeg 8.1.2 on Windows 11, third kind marker `(none)`
included.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-17 01:02:42 +03:00
firat 45e7af474a Remove downloaded Mac command during integration cleanup 2026-08-16 17:18:46 +02:00
yusufipek aef33585c1 Say where the Windows install comes from now that there are downloads 2026-08-16 15:55:52 +03:00
yusufipek 180ddac37e Let the Windows job read the merged suite
The merge put a Windows runner under tests master wrote for two systems,
and 21 of them fell over on it. Two were the quoting: `command_for` goes
through shlex now, so a Windows path comes back in quotes, and the two
tests that read the command as a string were reading it as a Linux one.
They ask through the same join instead.

The other nineteen are `integrate.py`, which writes the menu entry and
the login item a downloaded build installs for itself. There are two
downloads, an AppImage and a disk image, so the module has a Linux half
and a macOS half and nothing a Windows host would run: its tests hand
the fake home over in $HOME, which Windows does not read, and compare
paths that start at the root. They carry `@posix_only`, which comes off
again the day there is a Windows build to integrate.
2026-08-16 15:54:44 +03:00
yusufipek 80ff4ecade Merge master: the downloadable builds
Three files disagreed. The test workflow gained a job on either side, so
both stay: the Mac now parses the release and packaging scripts as well,
and Windows keeps its own job below.

`restart` and `launch_gui` both start Dikte again, and master moved that
argv into `ipc.launcher()` because a packaged build has no `__main__.py`
to name. Windows still cannot use execv there, so the detached start it
needs now takes what the launcher hands it rather than spelling the
interpreter and the script itself.

The test counts in CONTRIBUTING are the suite as it stands after the
merge: 1104 of 1147 run anywhere, and the 43 left are the Linux ones.
2026-08-16 15:44:40 +03:00
Yusuf İpek 569fe7cea8 Merge pull request #42 from yusufipk/more-ca-paths
Carry the two paths the RHEL family uses as well
2026-08-16 15:35:30 +03:00
yusufipek 4ca66b1e03 Carry the two paths the RHEL family uses as well
The list was four of the six that Go's crypto/x509 and curl both carry.
The missing two are the bundle under /etc/pki/ca-trust, which is where
RHEL 7 and CentOS keep it, and OpenELEC's. Neither is likely and both are
one line.

The rest was checked in containers rather than assumed: the first entry
answers Debian, Ubuntu, Arch, Gentoo, Fedora and Alpine, and openSUSE is
the only common distribution that needs a different one.
2026-08-16 15:29:29 +03:00
Yusuf İpek e7d0a37f79 Merge pull request #41 from yusufipk/system-certificates
Look up the machine's certificates rather than the build machine's
2026-08-16 15:26:26 +03:00
yusufipek 4cec05fa49 Look up the machine's certificates rather than the build machine's
A build carries the OpenSSL of the machine it was built on, and that
OpenSSL has one directory compiled into it as the only place it looks for
certificates. For an AppImage built on Ubuntu that is /usr/lib/ssl, which
Arch, Fedora and openSUSE do not have, so on any of them every HTTPS
request fails with CERTIFICATE_VERIFY_FAILED: transcription and cleanup
report it as a rejected key, and the model downloads fail too.

Ask the machine instead, from the list curl and Go use, and only when the
build's own answer turns out not to exist. The store on the machine
rather than a copy carried along, because a copy goes stale as roots are
rotated and would ignore a certificate somebody added themselves. Anybody
who has already set SSL_CERT_FILE is left alone.
2026-08-16 15:24:33 +03:00
Yusuf İpek f247752bc1 Merge pull request #39 from yusufipk/downloadable-builds
Build an AppImage and a disk image, and publish them
2026-08-16 15:15:24 +03:00
yusufipek 01c91eb425 Resolve the test's home before comparing paths to it
A Mac keeps temporary directories under /var, which is a symlink to
/private/var, and target() resolves what it is handed because a bundle
reached through a symlink is still that bundle. So the login item named
/private/var/... while the test held /var/..., and the two spellings of
one path did not match.
2026-08-16 15:09:40 +03:00
yusufipek 7e510f8b35 Build an AppImage and a disk image, and publish them
Installing meant cloning the repository and running a shell script, which
is a fair ask of somebody who already has a terminal open and no ask at
all of anybody else. The releases page now carries an AppImage and a disk
image per Mac architecture: a push to master rebuilds a rolling "latest",
a v* tag publishes a version and leaves it there, and the Run button in
the Actions tab raises the number by running scripts/release.sh, which is
the same script and not a second copy of what it does.

Two things in the application had to give for that. A build has no
__main__.py on disk, and an AppImage is mounted somewhere new every run,
so the command a shortcut is registered with cannot go on being this
interpreter and this file; ipc.launcher() answers with the AppImage or
the bundle instead. And a build carries its own libstdc++, which every
process it starts inherits through LD_LIBRARY_PATH and none of them can
live with: ffmpeg, ydotool and wl-copy are the distribution's binaries
built against the distribution's libraries, and AppImageLauncher, which
is what starting the AppImage again goes through, refuses outright.
integrate.py puts that variable back before anything else runs.

Nothing installs itself over an installation that is already there.
install.sh's menu entry, install-mac.sh's login item and the desktop file
AppImageLauncher writes are each recognised and left alone, so trying a
download once does not quietly move the machine onto it. `dikte
integrate` is how you ask for it outright, and --remove takes it back.

The disk image carries an ffmpeg, pinned and checksummed, because macOS
records through one and ships nothing like it. It is signed ad-hoc and
not with an Apple certificate, so a first launch is refused until Open
Anyway and the permissions are asked for again after each update; both
READMEs and the release notes say so.
2026-08-16 15:03:44 +03:00
Yusuf İpek 061dc5451b Merge pull request #38 from yusufipk/cleanup-language
Keep the transcript in the language it was spoken in
2026-08-16 14:26:16 +03:00
yusufipk 5236b27cb3 Keep the transcript in the language it was spoken in
The cleanup prompt is picked by interface language, so a Turkish
interface hands a Turkish system prompt to the model and English
dictation comes back translated. The rule against that was the fifth
line of a DO NOT list, which is not where a model looks when the whole
prompt around it is written in one language.

Move it up under the job, in both cleanup prompts, and say plainly that
the language the rules are written in decides nothing.
2026-08-16 14:24:00 +03:00
yusufipek bac988e0e6 Ask for the entry point by its parts, not by a slash
The assertion spelled the path with a forward slash, which is not the separator
Windows joins with. The Windows job this branch adds is the first to run it
there.
2026-08-16 14:13:12 +03:00
yusufipek b186f7fde2 Merge master: the modules moved into a package
Every file this branch touches moved into dikte/, so the merge is mostly the
rename following the edits. What needed a hand:

hotkey.py: master replaced the _macos()/_gnome() pair with one backend()
chooser, and this branch had added _windows() to the pair. Windows is a fifth
value of the chooser now, and everything that used to ask "macOS or Windows?"
asks backend() instead. The key is held by the running process there, so
installs_shortcuts() and shortcut_needs_restart() are both false for it, and
desktop_name() says Windows.

install.ps1 and the Windows README name dikte/__main__.py, the entry point the
Linux and macOS installers were pointed at in the same commit. The Start Menu
entry, the autostart entry and the dikte.cmd shim all come off one $entry
variable.

settings_ui.py: the shortcut tab now has a Windows sentence of its own, with
the Turkish for it. Falling through to the branch master wrote for a desktop
with no registry would have told a Windows user to check /dev/input. Nothing
covers that branch: there is no Windows Settings test class, the way there is
one for macOS.

CONTRIBUTING: the chooser it names is backend() now, and the test count is the
merged one, 1067 of 1110 running anywhere.
2026-08-16 14:10:28 +03:00
Yusuf İpek ea476665b8 Merge pull request #37 from yusufipk/package-layout
Put the modules in a package and the scripts in a folder
2026-08-16 14:02:39 +03:00
yusufipek 2f59029261 Put the modules in a package and the scripts in a folder
Twenty-two files at the top of the tree was the first thing anybody saw of
this repository. They are one package now, imported relatively, and the three
scripts that are not the front door moved under scripts/. install.sh stays
where the README has always said it is.

What starts the application is dikte/__main__.py: python3 -m dikte runs it,
and so does naming the file, which is what the launcher symlink, both .desktop
files, the macOS bundle and every registered shortcut do. Run by path there is
no package around it, so it puts the checkout on sys.path itself.

The installers now keep the keys you chose when they are given none, which is
what an update is: update.sh no longer has to read them out and pass them back.
An updater from before this commit cannot read them at all, so the one thing it
can say, the default key with an empty discard key, is read as "nothing was
asked for" rather than obeyed. That guard can go once nobody is updating across
this commit.
2026-08-16 14:01:01 +03:00
Yusuf İpek 8444b6822d Merge pull request #36 from yusufipk/generic-desktop-shortcuts
Stop telling every desktop that it is KDE
2026-08-16 13:43:38 +03:00
yusufipek 1f5ea70fa6 Stop telling every desktop that it is KDE
Only GNOME was recognised, and everything else was handed to KWin. On i3,
XFCE, Cinnamon, MATE, sway and the rest, Dikte wrote an entry into
kglobalshortcutsrc that nothing reads, called the session KDE, and
promised that the keys would work after the next login. They never did.

There is no backend to write for any of them. The /dev/input listener is
already desktop-agnostic, so those sessions are the case macOS has always
been: no registry, nothing to install, nothing to remove, and the
combination held by the running process. One backend() function decides
which of the four this session has, and the name shown, the status read
back, what Install writes, what Settings explains and what the installer
promises are all taken from it, so they cannot disagree.

A desktop now only counts when the program that writes its registry is
there too. A GNOME session without gsettings and a Plasma one without
kwriteconfig6 fall to the listener rather than to a file, which is also
how Plasma 5 stops erroring on a kwriteconfig6 it never had.

What Settings shows on those desktops is the truth: no Install button, no
KWin, no listener checkbox (it is the mechanism, not a choice), what
reading /dev/input costs, that the focused application sees the keys too,
and the command to bind if you would rather your desktop owned them. The
evdev listener records what it is listening for the way the Carbon one
does, so the status line has something to say there at all.

Closes #28
2026-08-16 13:41:27 +03:00
Yusuf İpek d0dc2d1a02 Merge pull request #35 from yusufipk/visible-tray-icon
Give the tray an icon a black bar cannot swallow
2026-08-16 13:30:43 +03:00
yusufipek e40191e3a7 Give the tray an icon a black bar cannot swallow
A session that names no desktop, which is what i3 and a bare X11 login are,
leaves Qt with hicolor as its only icon theme, and hicolor has none of the four
names the tray asks for. So fromTheme returns nothing and the shapes drawn in
trayicon.py are used, as they are on macOS. They were drawn in black, which
macOS recolours through the mask and X11 does not, and i3's bar is black: the
icon was there all along, painted onto a bar of its own colour. Outside macOS
they are now white over a dark copy of themselves spread a pixel out, which
stands out on a dark bar and stays readable on a light one, and the mask is set
only where something reads it.

The .desktop files had the same hole from the other side. They named
audio-input-microphone, which is in Breeze and in Adwaita but not in hicolor, so
the menu entry and the autostart entry were blank on the same systems. install.sh
now draws the application icon into ~/.local/share/icons/hicolor and both entries
name it; uninstall.sh takes it back. The windows carry it too on X11, where a
window has no .desktop file to be looked up in.

Closes #27
2026-08-16 13:28:57 +03:00
Yusuf İpek 416c788421 Merge pull request #34 from yusufipk/pause-resume
Let a recording be held while something else happens
2026-08-16 13:11:11 +03:00
yusufipek 0e767454f3 Let a recording be held while something else happens
A phone call in the middle of a dictation left two choices: send what
was said so far off to be transcribed, or throw it away. Both end the
sentence you were in the middle of. Now the recording can be held: the
microphone stays ours, what was said before the pause stays in the
buffer, and what is said during it is dropped.

The capture program keeps running and keeps handing blocks over, which
are read and thrown away rather than left in the pipe. Stopping it
instead would mean asking the sound server for the device again on the
way back, and that is the one moment another application can take it: a
recording would be lost to the phone call it was paused for.

The clock stops with it. Paused time is time the recording does not
have, so the indicator and the length limit both go by what was
actually captured, and a five minute limit is not spent waiting.

The indicator says so as well, since a pulsing dot, moving bars and a
counting clock otherwise all say the words are still going in: the
ribbon freezes where the pause found it and turns amber behind two
bars. The tray menu holds and resumes it, `dikte pause` does, and so
does a global shortcut, which starts empty because holding a recording
is not something a keyboard has a habit for.

Dictation and a command to the agent both, whichever is recording. A
meeting is left out: it writes to a file as it goes and keeps two
streams aligned itself, and neither of those wants a hole in it.
2026-08-16 13:06:36 +03:00
Yusuf İpekandSeyit Gokce 6397f6c403 Merge pull request #31 from seyitgkc/fix/settings-window-height
Keep the settings window inside the screen

Co-authored-by: Seyit Gokce <[email protected]>
2026-08-16 12:53:03 +03:00
Yusuf İpek 260fa20fb9 Merge pull request #33 from yusufipk/mac-test-bind
Stop the macOS test job waiting on a name nobody has
2026-08-16 12:51:28 +03:00
yusufipek 5547f85848 Keep the wheel off the boxes and a floor under the window
Two things the scrolling tabs brought with them.

A combo box and a spin box read the wheel as a change of value, and Qt
hands them the focus before delivering it. Now that every tab scrolls,
rolling down the API tab with the pointer over the model box picks a
different model on the way past, and Save writes it down. The boxes take
the focus by click or by tab only, and a wheel that arrives at one
without the focus is refused rather than swallowed, so it carries on up
to the scroll area and the page moves instead.

A tab that scrolls also asks for no height of its own, which left
nothing to stop the window being dragged down to a tab bar and half a
button. It has a floor now, and the floor never asks for more room than
the screen was just found to have.
2026-08-16 12:09:21 +03:00
yusufipek 1135362afa Let the test server open its port without asking who 127.0.0.1 is
The stand-in whisper server in the ggml tests is an http.server, and
http.server looks up the reverse name of the address it bound in between
the bind and the listen. On Linux that answers at once. On a Mac nothing
answers and the lookup sits in a resolver timeout for thirty-five
seconds, with the port closed the whole time and _wait_ready watching it.

Seven tests start a server and one of them starts two, so the macOS job
spent 330 of its 334 seconds inside that lookup while the same suite took
fifteen seconds on Linux. Binding through socketserver and naming the
server after the address it already has skips the question.
2026-08-16 11:57:55 +03:00
yusufipek 5025f8293c Describe the restart race as what it is, not as what it is not
The comment claimed the new process would take itself for the second copy and
hand its command over. That is the command line's path, through cli.run and
ipc.send; run_app with --gui never asks whether anything is already running, it
calls listen() and prints if that fails. The change is the same one either way:
two processes asking for one name is either two servers answering on it or a
listen that fails into a console nobody reads, and closing first leaves neither.
2026-08-16 11:47:40 +03:00
yusufipek 93f3db889d Say out loud that Windows on ARM gets an emulated whisper
Checked against the release listings rather than guessed: whisper.cpp publishes
Win32 and x64 for Windows and nothing else, while llama.cpp does publish
bin-win-cpu-arm64.zip. So a Snapdragon machine gets a native cleanup model and
an emulated transcriber, which is slow enough that the cloud is the better
answer there, and neither the code nor the README said so.

The test pins it, so that a whisper.cpp release which does start publishing an
arm64 build turns the choice red rather than being quietly ignored.
2026-08-16 11:12:36 +03:00
yusufipek 0419c88ac2 Run the tests on Windows too, which is where they have never run
Sixty of them are about the Windows backends, and every one of them has only
ever run on Linux and on a Mac: user32 and kernel32 are faked at the one
function that loads them, which is the whole point and is also the whole limit.
The half that reads the real system has been taken on trust. The Mac has had a
job of its own for exactly this reason since it was ported, and the comment on
it says what it is for; this is the same job with the same reason.

What it should catch that nothing else does: whether %APPDATA% and
%LOCALAPPDATA% are the directories Windows actually hands out, whether a path
spelled with a backslash is still one the tests can read, whether the
config-permission test skips rather than fails where the mode bits mean
nothing, and whether install.ps1 parses. Running install.ps1 is not on the
table: it writes into the Start Menu and the user PATH.
2026-08-16 10:58:09 +03:00
yusufipek 89de7eadfe Merge master into the Windows port, again
Master was rewritten between the two merges: the macOS meeting commits came
back under new hashes with the same content, so the first merge points at a
commit the repository no longer has and audio.py collides with itself. Nothing
in the resolution is a choice between two versions of anything; both sides of
both hunks are this branch's own additions against nothing.
2026-08-16 10:34:36 +03:00
yusufipek ec4d7da09d Say there is a fourth system in the two documents that count them
README.tr.md still offered three, so a Turkish reader could not tell Windows was
supported at all. CONTRIBUTING opens the section a port is written from, and it
described three tables and three systems; there are four of each now, plus
paths.py, which master separated out while this branch was adding a Windows case
to the two copies it replaced.
2026-08-16 10:29:07 +03:00
yusufipek 476265465f Write the Windows installer in the language the rest of it is written in
install.sh and install-mac.sh are in English, and README.tr.md is where Turkish
lives. install.ps1 arrived in Turkish, and in a Turkish with the diacritics
stripped out of it, which is neither one language nor the other.

Two things while it was open: the `dikte` command ran whichever `python` the
PATH answered with rather than the one checked a few lines above it, and a
machine with no WindowsApps directory got no command and no word about why.
2026-08-16 10:29:07 +03:00
yusufipek 743dcc9b8a Ask doctor and devices about the programs this system actually uses
`doctor` had the Wayland pair spelled into it, so an X11 machine was never
asked about the two it really pastes with, a Mac was told ydotool and
kwriteconfig6 were missing, and Windows, which shells out for neither half of
the clipboard, got five red marks for programs it was never going to have. The
two come out of `paste.Desktop` now, and the Linux-only three are added on
Linux. A row saying a program is missing on a machine that would never have run
it is not a diagnosis, it is a mark to explain away.

`devices` had the same shape of answer: "pactl found nothing; is PipeWire
running?" on a Windows machine with no microphone. It names whatever this sound
system is missing instead, which is the string the table already carries for it.

The Windows README's troubleshooting sends people to both, so it says so.
2026-08-16 10:29:07 +03:00
yusufipek bbb9bccda4 Stop answering before the replacement starts, on a restart
execv leaves nothing behind to answer, so this never came up on Linux or a Mac.
A Windows restart is two processes for a moment: the new one looks for an
instance to hand its command to, and if it finds the old one still listening it
takes itself for the second copy and exits, leaving nothing running at all. The
server is closed before the replacement is started rather than after.

Not reproduced, because it is a race and it lost: found by reading the order of
the two calls, and worth a restart or twenty on a real machine.
2026-08-16 10:28:52 +03:00
yusufipek ca559e3961 Fill the clipboard buffer before emptying the clipboard
EmptyClipboard is the point of no return: after it, whatever was there is gone,
and the allocation that failed on the next line left the clipboard holding
nothing. That is the one path where restoring what a dictation borrowed could
lose it instead. The buffer is filled first, and the clipboard is opened only
once there is something to put in it.
2026-08-16 10:28:52 +03:00
yusufipek 8c62795b8b Give Windows devices an identifier, and ask ffmpeg for them once
Three things about the dshow backend, all of them found by reading rather
than by running, so all three want checking on a real Windows machine.

The device listing is parsed in both of the shapes ffmpeg has printed it in:
newer builds mark every device `(audio)` or `(video)`, older ones print a
heading and no marks, and only the first was read. Each pattern is anchored at
both ends now, so the error lines the command ends with, which quote the device
name it was told to look for, are no longer read as a device of that name.

What is stored for a device is the alternative name under it rather than the
friendly one. A laptop with a headset plugged in has two microphones called the
same thing, and `audio=Microphone` reaches the first of them whichever one was
picked; the alternative name is unique. The friendly name stays what is shown,
which is what the (id, description) pair in these lists has always been for.

An unset microphone meant "the first one listed", and the listing costs an
ffmpeg of its own, so every press of the key paid for a process before the
recording started. The last listing is remembered instead, and opening Settings
or running `dikte devices` takes a fresh one.

And a fourth thing, which is about what the interface says rather than what it
does: whether the far side of a meeting can be captured at all is now an entry
in `audio.Sound` instead of being read off an empty device list. The two are not
the same answer. An empty list on Linux means pactl is not installed, which a
user can go and fix; False on Windows means there is no such device and no
driver that would add one. The Meeting tab says so under the empty box, and
starting a meeting says it instead of sending somebody to Settings to pick from
a list that will never have anything in it.
2026-08-16 10:28:43 +03:00
Yusuf İpek 2b9f91687c Merge pull request #26 from benfirad/codex/macos-audio-device-safety
Harden macOS meeting audio capture
2026-08-16 10:20:23 +03:00
yusufipekandbenfirad 322e06dd7a Keep the meeting a quiet microphone gave us, and read both captures at once
A recording is never deleted for being disappointing. A microphone that
handed over nothing still leaves the right channel, which is everyone
else, and an hour of them is worth more than the empty channel costs; the
one thing the user cannot get back is the half that was there. So the
exact-zero check stays and stops throwing the file away: it says what the
microphone did, in a tray warning next to the recording being written up,
and the minutes are produced from what there is.

Reading the two capture pipes in turn from one thread put the failure it
was meant to fix back in a worse place. A microphone that stops delivering
leaves that read waiting forever, and the far side is not read either
until its pipe fills and its ffmpeg stops writing into it: the meeting
freezes, the levels sit still, and nothing is said for as long as nobody
looks. Each stream now has a reader of its own and a queue, so neither can
hold the other up, and a side that has said nothing for STALL_SECONDS ends
the recording the way a dead ffmpeg already did, out loud and keeping what
was captured.

Which system needs how many processes belongs in the table with everything
else that differs, so meeting() returns the list of commands it takes:
one on PulseAudio, one per device on a Mac. meeting_commands() is the
chooser again rather than a function with a Mac inside it, and the empty
entry in COREAUDIO is gone. The two AVFoundation targets are resolved
against a single device listing, which costs one ffmpeg run instead of two
and cannot see the indexes renumber between the microphone and the far
side.

Co-authored-by: benfirad <[email protected]>
2026-08-16 10:20:23 +03:00
yusufipek 191eef8f8d Merge master into the Windows port
Three of the four collisions were the same one: master moved the directory
rule into paths.py while this branch was adding a Windows case to the copy in
config.py and the second copy in ggml.py. The case moves to paths.py with the
rest of it, and the directories test moves to tests/test_paths.py where master
put its neighbours.

The fourth is MeetingRecorder, which now starts a process per capture device.
Windows keeps its two lines there: no console window for either process, and
a stop that terminates rather than sending a signal the platform does not have.
2026-08-16 10:14:37 +03:00
Yusuf İpek ef016d326f Merge pull request #26 from benfirad/codex/macos-audio-device-safety
Harden macOS meeting audio capture
2026-08-16 10:00:29 +03:00
yusufipek a6fab18a22 Keep the meeting a quiet microphone gave us, and read both captures at once
A recording is never deleted for being disappointing. A microphone that
handed over nothing still leaves the right channel, which is everyone
else, and an hour of them is worth more than the empty channel costs; the
one thing the user cannot get back is the half that was there. So the
exact-zero check stays and stops throwing the file away: it says what the
microphone did, in a tray warning next to the recording being written up,
and the minutes are produced from what there is.

Reading the two capture pipes in turn from one thread put the failure it
was meant to fix back in a worse place. A microphone that stops delivering
leaves that read waiting forever, and the far side is not read either
until its pipe fills and its ffmpeg stops writing into it: the meeting
freezes, the levels sit still, and nothing is said for as long as nobody
looks. Each stream now has a reader of its own and a queue, so neither can
hold the other up, and a side that has said nothing for STALL_SECONDS ends
the recording the way a dead ffmpeg already did, out loud and keeping what
was captured.

Which system needs how many processes belongs in the table with everything
else that differs, so meeting() returns the list of commands it takes:
one on PulseAudio, one per device on a Mac. meeting_commands() is the
chooser again rather than a function with a Mac inside it, and the empty
entry in COREAUDIO is gone. The two AVFoundation targets are resolved
against a single device listing, which costs one ffmpeg run instead of two
and cannot see the indexes renumber between the microphone and the far
side.
2026-08-16 09:51:02 +03:00
Can Soykan Yılmaz 44cfb76652 Give a Mac an installer, an app bundle and a menu bar icon it can see
The macOS backends were already here: CoreAudio capture through ffmpeg,
pbcopy and CoreGraphics, Carbon hotkeys, the paths under ~/Library. What
was missing was everything that installs them, so install.sh hands over to
install-mac.sh on Darwin rather than growing a branch per line: the XDG
directories, the .desktop files and the shortcut registry mean nothing
there, and an application is a bundle rather than a path. The bundle
carries a copy of the interpreter, because macOS files the microphone and
Accessibility permissions against the process that asks, and a launcher
running Homebrew's python3 would have asked as python3 and shared the
grant with everything else on that interpreter. It is signed ad-hoc so a
reinstall is the same application rather than two more dialogs, and it
says so plainly when a brew upgrade has moved the tree it needs.
uninstall.sh and update.sh follow it.

The tray icon was invisible: QIcon.fromTheme wants a freedesktop icon
theme and hands back a null icon without one, which in a menu bar is the
whole interface gone. trayicon.py draws the three shapes as template
images, so they follow the menu bar into dark mode, and the bundle's icon
comes off the same glyph rather than a binary in the repository. Linux
keeps its own icons; these are used only where the theme has nothing.

paths.py is the fix that was never about a Mac. config.py imports ggml.py,
so ggml.py could not ask it where the data goes; each worked it out for
itself and only one of them knew about macOS. Settings went to ~/Library
while several gigabytes of models went to ~/.local/share, which is not a
place a Mac user looks and not a place uninstall.sh --purge would have
deleted from.

Ctrl+Space is the input-source switch there and Cmd+Space is Spotlight, so
the default is Ctrl+Option+Space, and hotkey.default_combo is the one
place that difference lives. The first paste asks for Accessibility with
kAXTrustedCheckOptionPrompt, which is what creates the row to switch on;
asking the other way opens a pane Dikte is not listed in. `dikte shortcut
status` asks the running instance, since the combination is held by that
process and by nothing else.

Local speech to text is the one piece a Mac builds by hand. whisper.cpp
publishes no macOS binary and Homebrew's is configured with
WHISPER_BUILD_SERVER=OFF, so it installs whisper-cli and not the server
Dikte talks to; program_path already takes a whisper-server off the PATH
or out of Settings, so the answer is the one a Linux distribution gets,
and the README carries the cmake line. CI grows a macOS job on 3.11 and
3.13, the only place the Carbon and CoreGraphics libraries have to be
there to be opened.

Written and tested on macOS 27.0 arm64. Two things are still unverified on
a Mac: the paste end to end, which waits on the Accessibility toggle, and
a meeting recording, which needs a loopback driver.
2026-08-15 15:56:27 +03:00
Seyit Gokce f7fa37b4b7 Keep the settings window inside the screen
Only two tabs scrolled, so the rest handed their full content height to
the window as a minimum. The API tab alone asked for 668px, which put the
window's minimum at 756px: taller than a laptop screen has room for once
the menu bar and dock have taken theirs, and unshrinkable, so Save sat off
the bottom edge. Every tab scrolls now, and the opening size is clamped to
what the screen actually offers.

The program path in the local model box was clipped to one line for a
related reason: it shares a form row with a button, and the row is
measured before its width is known. WrappedLabel re-measures against the
width it ends up with and claims that height back.
2026-08-14 17:21:37 -04:00