mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 10:56:10 +00:00
Transcribe on OpenRouter too, not just OpenAI
OpenRouter mirrors OpenAI's /audio/transcriptions field for field, so one multipart request serves both providers and only the key, the base URL and the model id change. That puts a dozen speech models behind the key that was already there for the cleanup, and makes a single OpenRouter key enough for the whole chain. Its transcription endpoint takes no hint field, so the words from Cleanup rules are not sent there; they still reach the cleanup model as a glossary. Timestamps switch to openai/whisper-1, the namespaced id of the only model that returns segment times. The API tab is now grouped by role rather than by service, because a key no longer belongs to a single job: both keys sit at the top, the two jobs below. Each provider keeps its own model, so switching back and forth does not overwrite the other one's.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Dikte
|
||||
|
||||
Press `Ctrl+Space`, talk, press again. The recording goes to OpenAI for
|
||||
transcription, a model on OpenRouter cleans it up (dropping the *uh*s, the
|
||||
Press `Ctrl+Space`, talk, press again. The recording goes to OpenAI or OpenRouter
|
||||
for transcription, a model on OpenRouter cleans it up (dropping the *uh*s, the
|
||||
restarts, the missing punctuation), and the result lands in your clipboard and
|
||||
is pasted into whatever window you were typing in.
|
||||
|
||||
@@ -32,12 +32,12 @@ dikte # the settings window opens on first run
|
||||
`install.sh` adds the `dikte` command, a menu entry, an autostart entry and the
|
||||
KDE shortcut.
|
||||
|
||||
Two keys go in the settings window: **OpenAI** for speech to text
|
||||
(`gpt-4o-transcribe`) and **OpenRouter** for the cleanup
|
||||
(`google/gemini-3.5-flash-lite` by default, any model on the list works). They
|
||||
fall back to `OPENAI_API_KEY` and `OPENROUTER_API_KEY`, and are stored in
|
||||
`~/.config/dikte/config.json`, mode 600. Cleanup can be switched off, in which
|
||||
case the raw transcript is pasted.
|
||||
Two keys go in the settings window: **OpenAI** and **OpenRouter**. Speech to text
|
||||
runs on either one (`gpt-4o-transcribe` by default), cleanup always on
|
||||
OpenRouter (`google/gemini-3.5-flash-lite`), so a single OpenRouter key can
|
||||
cover both. They fall back to `OPENAI_API_KEY` and `OPENROUTER_API_KEY`, and are
|
||||
stored in `~/.config/dikte/config.json`, mode 600. Cleanup can be switched off,
|
||||
in which case the raw transcript is pasted.
|
||||
|
||||
## Using it
|
||||
|
||||
@@ -99,7 +99,7 @@ needs your user in the `input` group: `sudo usermod -aG input $USER`.
|
||||
```
|
||||
dikte.py entry point, tray icon, state machine, IPC
|
||||
audio.py raw PCM capture through pw-record plus the level meter
|
||||
api.py OpenAI transcription and OpenRouter cleanup (stdlib only)
|
||||
api.py transcription on either provider, OpenRouter cleanup (stdlib only)
|
||||
worker.py transcribe → clean up → clipboard → paste
|
||||
vad.py deciding whether a recording holds speech at all
|
||||
filetranscribe.py file transcription: ffmpeg, chunking, timestamps
|
||||
|
||||
Reference in New Issue
Block a user