Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
feat: Add Support for Tinfoil model provider (#944)
Daniel MS155e7d762e2a
diff --git a/package-lock.json b/package-lock.jsonindex 5f19db49f..d6bd2f609 100644--- a/package-lock.json+++ b/package-lock.json@@ -60,6 +60,7 @@"shadcn-ui": "^0.9.5","tailwind-merge": "^3.3.1","tar": "^7.5.16",+ "tinfoil": "^1.1.7","tiptap-markdown": "^0.9.0","tw-animate-css": "^1.3.4","unbzip2-stream": "^1.4.3",@@ -143,12 +144,43 @@}},"node_modules/@ai-sdk/gateway": {- "version": "3.0.94",+ "version": "3.0.143",+ "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-3.0.143.tgz",+ "integrity": "sha512-RCH60KsUaNiZkI/fBuyau4yvYrVBIEgAcN+Ain94QpL1kVm28GduQzFKfGffAiJU2We0ZrmN4BHkoCZzACK96Q==","license": "Apache-2.0","dependencies": {- "@ai-sdk/provider": "3.0.8",- "@ai-sdk/provider-utils": "4.0.23",- "@vercel/oidc": "3.1.0"+ "@ai-sdk/provider": "3.0.13",+ "@ai-sdk/provider-utils": "4.0.35",+ "@vercel/oidc": "3.2.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "zod": "^3.25.76 || ^4.1.8"+ }+ },+ "node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider": {+ "version": "3.0.13",+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-3.0.13.tgz",+ "integrity": "sha512-ZPtVYt5QIJzOta1kdUiDuCx4HhFkvNPv/rvmZ2b1iXwybYjJsCnNYR4PAw4kW7rgVfDARvHXcU64efWuqNp6bw==",+ "license": "Apache-2.0",+ "dependencies": {+ "json-schema": "^0.4.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider-utils": {+ "version": "4.0.35",+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-4.0.35.tgz",+ "integrity": "sha512-bjYld/2KGPLt78kpqbya+fD4LYS7BqVQJyUjE3qAHrYB0FR2Q90BaWEVIBZaguTWXf/A8L6uG1zO1v9TxVlGWg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/provider": "3.0.13",+ "@standard-schema/spec": "^1.1.0",+ "eventsource-parser": "^3.0.8"},"engines": {"node": ">=18"@@ -1868,6 +1900,65 @@"version": "0.2.11","license": "MIT"},+ "node_modules/@freedomofpress/crypto-browser": {+ "version": "0.1.7",+ "resolved": "https://registry.npmjs.org/@freedomofpress/crypto-browser/-/crypto-browser-0.1.7.tgz",+ "integrity": "sha512-zjWmZDKdAu8g0Zq1IjBQ+sKQ/NpfzStBDFjy/qHUSMVEL4wNlNGtA7lhtw8v8asXa0yqF2QTYQ3rq6xCTQeADw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@noble/curves": "^1.6.0"+ },+ "peerDependencies": {+ "@noble/curves": "^1.6.0"+ }+ },+ "node_modules/@freedomofpress/crypto-browser/node_modules/@noble/curves": {+ "version": "1.9.7",+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz",+ "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==",+ "license": "MIT",+ "dependencies": {+ "@noble/hashes": "1.8.0"+ },+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@freedomofpress/crypto-browser/node_modules/@noble/hashes": {+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",+ "license": "MIT",+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@freedomofpress/sigstore-browser": {+ "version": "0.1.13",+ "resolved": "https://registry.npmjs.org/@freedomofpress/sigstore-browser/-/sigstore-browser-0.1.13.tgz",+ "integrity": "sha512-3YfmP9JQ5h8CAO/vKJEGYrFdzss6xWxYi5ZkbR4KoHlxIaLGrnu+5TQDoZVWhuhyfDBdLQqj6ypdN0W6PsH3Jw==",+ "license": "MIT",+ "dependencies": {+ "@freedomofpress/crypto-browser": "^0.1.7",+ "@freedomofpress/tuf-browser": "^0.1.11",+ "@noble/curves": "^2.0.1"+ }+ },+ "node_modules/@freedomofpress/tuf-browser": {+ "version": "0.1.11",+ "resolved": "https://registry.npmjs.org/@freedomofpress/tuf-browser/-/tuf-browser-0.1.11.tgz",+ "integrity": "sha512-d76ohB/AS5+zI+lnbiFMX/BIK3nT18hZ8q3Na6X4vyYaSYjXkeknzhAnbx1da+8ObWLwsaZLue46haEch28qtQ==",+ "license": "MIT",+ "dependencies": {+ "@freedomofpress/crypto-browser": "^0.1.7"+ }+ },"node_modules/@humanfs/core": {"version": "0.19.1","dev": true,@@ -2373,8 +2464,25 @@}},"node_modules/@noble/ciphers": {- "version": "2.1.1",+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.2.0.tgz",+ "integrity": "sha512-Z6pjIZ/8IJcCGzb2S/0Px5J81yij85xASuk1teLNeg75bfT07MV3a/O2Mtn1I2se43k3lkVEcFaR10N4cgQcZA==",+ "license": "MIT",+ "engines": {+ "node": ">= 20.19.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@noble/curves": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.2.0.tgz",+ "integrity": "sha512-T/BoHgFXirb0ENSPBquzX0rcjXeM6Lo892a2jlYJkqk83LqZx0l1Of7DzlKJ6jkpvMrkHSnAcgb5JegL8SeIkQ==","license": "MIT",+ "dependencies": {+ "@noble/hashes": "2.2.0"+ },"engines": {"node": ">= 20.19.0"},@@ -2394,6 +2502,23 @@"url": "https://paulmillr.com/funding/"}},+ "node_modules/@noble/post-quantum": {+ "version": "0.6.1",+ "resolved": "https://registry.npmjs.org/@noble/post-quantum/-/post-quantum-0.6.1.tgz",+ "integrity": "sha512-+pormrDZwjRw05U8ADK4JpHejo87+gBd+muRBB/ozztH5yhDLMDF4jHQWN3NQQAsu1zBNPWTG0ZwVI0CR29H0A==",+ "license": "MIT",+ "dependencies": {+ "@noble/ciphers": "~2.2.0",+ "@noble/curves": "~2.2.0",+ "@noble/hashes": "~2.2.0"+ },+ "engines": {+ "node": ">= 20.19.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },"node_modules/@nodable/entities": {"version": "2.2.0","resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.2.0.tgz",@@ -2463,6 +2588,24 @@"url": "https://github.com/sponsors/Boshen"}},+ "node_modules/@panva/hpke-noble": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/@panva/hpke-noble/-/hpke-noble-1.1.3.tgz",+ "integrity": "sha512-zPG7MR9x7QE7+KdYsKBO9H0vp3AdYt9/4AT3ab7T7W6SL0fdRqhgNRu8q4OGTJNLeKpdbkkRb6LhBDaA9+9xWQ==",+ "license": "MIT",+ "dependencies": {+ "@noble/ciphers": "^2.2.0",+ "@noble/curves": "^2.2.0",+ "@noble/hashes": "^2.2.0",+ "@noble/post-quantum": "^0.6.1"+ },+ "funding": {+ "url": "https://github.com/sponsors/panva"+ },+ "peerDependencies": {+ "hpke": "^1.0.0"+ }+ },"node_modules/@pkgjs/parseargs": {"version": "0.11.0","dev": true,@@ -3710,18 +3853,12 @@}},"node_modules/@smithy/core": {- "version": "3.23.16",+ "version": "3.29.1",+ "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.29.1.tgz",+ "integrity": "sha512-qoiY4nrk5OCu1+eIR1VB8l5DmON/oKiqrd5zZFAhXJXjJlLWQusKEW/SkBDAtGDcPaz86m9kfcE1lngU0GlM6A==","license": "Apache-2.0","dependencies": {- "@smithy/protocol-http": "^5.3.14",- "@smithy/types": "^4.14.1",- "@smithy/url-parser": "^4.2.14",- "@smithy/util-base64": "^4.3.2",- "@smithy/util-body-length-browser": "^4.2.2",- "@smithy/util-middleware": "^4.2.14",- "@smithy/util-stream": "^4.5.24",- "@smithy/util-utf8": "^4.2.2",- "@smithy/uuid": "^1.1.2",+ "@smithy/types": "^4.15.1","tslib": "^2.6.2"},"engines": {@@ -3770,12 +3907,12 @@}},"node_modules/@smithy/hash-node": {- "version": "4.2.14",+ "version": "4.4.6",+ "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.4.6.tgz",+ "integrity": "sha512-O6YGQgZGxypohUJDm+aIBNx9ldzOvQOjnnAmHYKAVJcVRMYQLf+g88s/vCUIHJudeXbgEo7xq1vXUGYlBpdBsg==","license": "Apache-2.0","dependencies": {- "@smithy/types": "^4.14.1",- "@smithy/util-buffer-from": "^4.2.2",- "@smithy/util-utf8": "^4.2.2",+ "@smithy/core": "^3.29.1","tslib": "^2.6.2"},"engines": {@@ -3968,16 +4105,13 @@}},"node_modules/@smithy/signature-v4": {- "version": "5.3.14",+ "version": "5.6.2",+ "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.6.2.tgz",+ "integrity": "sha512-QgHflghMoPxCJ9axiCVh8KZfbC9fuP6vkXXyK//E3cq7nLaSSyyLj0GAoqVWezYeDQmXIZhmlRvLE16jsqDK6g==","license": "Apache-2.0","dependencies": {- "@smithy/is-array-buffer": "^4.2.2",- "@smithy/protocol-http": "^5.3.14",- "@smithy/types": "^4.14.1",- "@smithy/util-hex-encoding": "^4.2.2",- "@smithy/util-middleware": "^4.2.14",- "@smithy/util-uri-escape": "^4.2.2",- "@smithy/util-utf8": "^4.2.2",+ "@smithy/core": "^3.29.1",+ "@smithy/types": "^4.15.1","tslib": "^2.6.2"},"engines": {@@ -4001,7 +4135,9 @@}},"node_modules/@smithy/types": {- "version": "4.14.1",+ "version": "4.15.1",+ "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.15.1.tgz",+ "integrity": "sha512-x3L0XSACF6UYzKpa9biqiRMgvH5+wnFFew9Tm/grFYqgaupPwx/+ojDPpPJM8dZON3S9tjz5U+PQYsCBd1Mw5Q==","license": "Apache-2.0","dependencies": {"tslib": "^2.6.2"@@ -4575,6 +4711,20 @@"url": "https://github.com/sponsors/tannerlinsley"}},+ "node_modules/@tinfoilsh/verifier": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/@tinfoilsh/verifier/-/verifier-1.1.7.tgz",+ "integrity": "sha512-KCGjBxTWxAb+/cldPYYvS77PoXrf/HPIOV+34SkAy2MUMq5WHD1uzLEYV6FIAKYPL/wT85zG6yFlweHxq5+CmA==",+ "license": "AGPL-3.0-or-later",+ "dependencies": {+ "@freedomofpress/crypto-browser": "^0.1.7",+ "@freedomofpress/sigstore-browser": "^0.1.13",+ "@freedomofpress/tuf-browser": "^0.1.11"+ },+ "engines": {+ "node": ">=20"+ }+ },"node_modules/@tiptap/core": {"version": "3.22.5","resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.22.5.tgz",@@ -5149,7 +5299,6 @@},"node_modules/@types/node": {"version": "25.5.2",- "dev": true,"license": "MIT","dependencies": {"undici-types": "~7.18.0"@@ -5201,6 +5350,15 @@"license": "MIT","optional": true},+ "node_modules/@types/ws": {+ "version": "8.18.1",+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",+ "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },"node_modules/@types/yauzl": {"version": "2.10.3","dev": true,@@ -5456,7 +5614,9 @@"license": "ISC"},"node_modules/@vercel/oidc": {- "version": "3.1.0",+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.2.0.tgz",+ "integrity": "sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug==","license": "Apache-2.0","engines": {"node": ">= 20"@@ -5551,13 +5711,44 @@}},"node_modules/ai": {- "version": "6.0.154",+ "version": "6.0.219",+ "resolved": "https://registry.npmjs.org/ai/-/ai-6.0.219.tgz",+ "integrity": "sha512-rtTDz99Rc9HsstSJ7YdO8DX7DQwS442N2vQ5jOopXDdo4qfkLrtIRpORdztFMOZxX/XjBzHRlvqF6eMg3cpyLA==","license": "Apache-2.0","dependencies": {- "@ai-sdk/gateway": "3.0.94",- "@ai-sdk/provider": "3.0.8",- "@ai-sdk/provider-utils": "4.0.23",- "@opentelemetry/api": "1.9.0"+ "@ai-sdk/gateway": "3.0.143",+ "@ai-sdk/provider": "3.0.13",+ "@ai-sdk/provider-utils": "4.0.35",+ "@opentelemetry/api": "^1.9.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "zod": "^3.25.76 || ^4.1.8"+ }+ },+ "node_modules/ai/node_modules/@ai-sdk/provider": {+ "version": "3.0.13",+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-3.0.13.tgz",+ "integrity": "sha512-ZPtVYt5QIJzOta1kdUiDuCx4HhFkvNPv/rvmZ2b1iXwybYjJsCnNYR4PAw4kW7rgVfDARvHXcU64efWuqNp6bw==",+ "license": "Apache-2.0",+ "dependencies": {+ "json-schema": "^0.4.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/ai/node_modules/@ai-sdk/provider-utils": {+ "version": "4.0.35",+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-4.0.35.tgz",+ "integrity": "sha512-bjYld/2KGPLt78kpqbya+fD4LYS7BqVQJyUjE3qAHrYB0FR2Q90BaWEVIBZaguTWXf/A8L6uG1zO1v9TxVlGWg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@ai-sdk/provider": "3.0.13",+ "@standard-schema/spec": "^1.1.0",+ "eventsource-parser": "^3.0.8"},"engines": {"node": ">=18"@@ -7418,6 +7609,19 @@"safe-buffer": "^5.0.1"}},+ "node_modules/ehbp": {+ "version": "0.2.5",+ "resolved": "https://registry.npmjs.org/ehbp/-/ehbp-0.2.5.tgz",+ "integrity": "sha512-Fjos3ct9f1Fxf2xckV+dXUez9vRa+k+pn3gqkivg0WaJ4WIQwXBCdT8iphr/+DmAQE9JKo4FdedwR3gwlA2kvA==",+ "license": "MIT",+ "dependencies": {+ "@panva/hpke-noble": "^1.0.3",+ "hpke": "^1.0.1"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },"node_modules/ejs": {"version": "3.1.10","dev": true,@@ -7997,7 +8201,9 @@}},"node_modules/eventsource-parser": {- "version": "3.0.6",+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.0.tgz",+ "integrity": "sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg==","license": "MIT","engines": {"node": ">=18.0.0"@@ -8872,6 +9078,15 @@"dev": true,"license": "ISC"},+ "node_modules/hpke": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/hpke/-/hpke-1.1.3.tgz",+ "integrity": "sha512-nViXp6Au3UmGSIHlKIz8GQSuHJsscLTqZciHnssYMyuxHJvj3M4jBYpN3CbffTNPhhz2NQuUiC+TIaDxxP7NCw==",+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/panva"+ }+ },"node_modules/html-parse-stringify": {"version": "3.0.1","license": "MIT",@@ -10897,6 +11112,36 @@"onnxruntime-common": "1.24.3"}},+ "node_modules/openai": {+ "version": "6.45.0",+ "resolved": "https://registry.npmjs.org/openai/-/openai-6.45.0.tgz",+ "integrity": "sha512-5DQVNErssk0afNpTTHUm/qZPU4iKR9OYdNid8Ib4puq4gHNNvGWZht2zY4h9a8JMF949Ik6m8gQutllVPbjdnw==",+ "license": "Apache-2.0",+ "peerDependencies": {+ "@aws-sdk/credential-provider-node": ">=3.972.0 <4",+ "@smithy/hash-node": ">=4.3.0 <5",+ "@smithy/signature-v4": ">=5.4.0 <6",+ "ws": "^8.18.0",+ "zod": "^3.25 || ^4.0"+ },+ "peerDependenciesMeta": {+ "@aws-sdk/credential-provider-node": {+ "optional": true+ },+ "@smithy/hash-node": {+ "optional": true+ },+ "@smithy/signature-v4": {+ "optional": true+ },+ "ws": {+ "optional": true+ },+ "zod": {+ "optional": true+ }+ }+ },"node_modules/optionator": {"version": "0.9.4","dev": true,@@ -12501,6 +12746,53 @@"version": "2.3.8","license": "MIT"},+ "node_modules/tinfoil": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/tinfoil/-/tinfoil-1.1.7.tgz",+ "integrity": "sha512-vzxv96ELF2TCxD1lRoquHExZMdHTQqBA8q6DDZOkDhf2grl2XoKzXK+pUDOo02inQBa+mya+wOzYdT1JHqbumg==",+ "license": "AGPL-3.0-or-later",+ "dependencies": {+ "@ai-sdk/openai-compatible": "^2.0.41",+ "@freedomofpress/sigstore-browser": "^0.1.13",+ "@tinfoilsh/verifier": "1.1.7",+ "@types/ws": "^8.18.1",+ "ehbp": "^0.2.0",+ "openai": "^6.34.0",+ "ws": "^8.21.0"+ },+ "engines": {+ "node": ">=20"+ },+ "peerDependencies": {+ "ai": "^6.0.168"+ },+ "peerDependenciesMeta": {+ "ai": {+ "optional": true+ }+ }+ },+ "node_modules/tinfoil/node_modules/ws": {+ "version": "8.21.0",+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",+ "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",+ "license": "MIT",+ "engines": {+ "node": ">=10.0.0"+ },+ "peerDependencies": {+ "bufferutil": "^4.0.1",+ "utf-8-validate": ">=5.0.2"+ },+ "peerDependenciesMeta": {+ "bufferutil": {+ "optional": true+ },+ "utf-8-validate": {+ "optional": true+ }+ }+ },"node_modules/tiny-async-pool": {"version": "1.3.0","dev": true,@@ -12768,7 +13060,6 @@},"node_modules/undici-types": {"version": "7.18.2",- "dev": true,"license": "MIT"},"node_modules/unified": {diff --git a/package.json b/package.jsonindex fb2f4308e..db2c57825 100644--- a/package.json+++ b/package.json@@ -162,6 +162,7 @@"shadcn-ui": "^0.9.5","tailwind-merge": "^3.3.1","tar": "^7.5.16",+ "tinfoil": "^1.1.7","tiptap-markdown": "^0.9.0","tw-animate-css": "^1.3.4","unbzip2-stream": "^1.4.3",diff --git a/preload.js b/preload.jsindex 6d5b27460..59f77a4c5 100644--- a/preload.js+++ b/preload.js@@ -379,6 +379,8 @@ contextBridge.exposeInMainWorld("electronAPI", {getCortiClientSecret: () => ipcRenderer.invoke("get-corti-client-secret"),saveCortiClientSecret: (key) => ipcRenderer.invoke("save-corti-client-secret", key),proxyCortiTranscription: (data) => ipcRenderer.invoke("proxy-corti-transcription", data),+ getTinfoilKey: () => ipcRenderer.invoke("get-tinfoil-key"),+ saveTinfoilKey: (key) => ipcRenderer.invoke("save-tinfoil-key", key),// Custom endpoint API keysgetCustomTranscriptionKey: () => ipcRenderer.invoke("get-custom-transcription-key"),diff --git a/src/assets/icons/providers/tinfoil.svg b/src/assets/icons/providers/tinfoil.svgnew file mode 100644index 000000000..ef88e1303--- /dev/null+++ b/src/assets/icons/providers/tinfoil.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 960">+ <path d="M955.4,718.23l-674.69,205.77L6.34,708.97,268.9,35.01l686.5,683.22ZM164.94,665.52l143.05,112.11,397.97-121.37-387.26-385.41-153.76,394.66Z" style="fill: #000;"/>+</svg>diff --git a/src/components/OnboardingFlow.tsx b/src/components/OnboardingFlow.tsxindex b8e7b75c3..649afa483 100644--- a/src/components/OnboardingFlow.tsx+++ b/src/components/OnboardingFlow.tsx@@ -101,6 +101,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {groqApiKey,xaiApiKey,mistralApiKey,+ tinfoilApiKey,dictationKey,meetingKey,setMeetingKey,@@ -894,6 +895,8 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {return mistralApiKey.trim().length > 0;} else if (cloudTranscriptionProvider === "corti") {return cortiClientId.trim().length > 0 && cortiClientSecret.trim().length > 0;+ } else if (cloudTranscriptionProvider === "tinfoil") {+ return tinfoilApiKey.trim().length > 0;} else if (cloudTranscriptionProvider === "custom") {// Custom can work without API key for local endpointsreturn true;diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsxindex 7d99d0ac4..7af2f6257 100644--- a/src/components/SettingsPage.tsx+++ b/src/components/SettingsPage.tsx@@ -223,6 +223,9 @@ interface TranscriptionSectionProps {}) => void;}+// Providers that forward the live-preview flag (see STREAMING_PROVIDERS in audioManager.js).+const CLOUD_PREVIEW_PROVIDERS = new Set(["tinfoil"]);+function TranscriptionSection({isSignedIn,startOnboarding,@@ -366,7 +369,12 @@ function TranscriptionSection({onSelect={handleTranscriptionModeSelect}/>- {transcriptionMode === "providers" && renderTranscriptionPicker("cloud")}+ {transcriptionMode === "providers" && (+ <>+ {renderTranscriptionPicker("cloud")}+ {CLOUD_PREVIEW_PROVIDERS.has(cloudTranscriptionProvider) && renderPreviewToggle()}+ </>+ )}{transcriptionMode === "local" && (<>{renderTranscriptionPicker("local")}diff --git a/src/components/TranscriptionModelPicker.tsx b/src/components/TranscriptionModelPicker.tsxindex f0ee3568d..b55c2ab83 100644--- a/src/components/TranscriptionModelPicker.tsx+++ b/src/components/TranscriptionModelPicker.tsx@@ -205,6 +205,7 @@ const CLOUD_PROVIDER_TABS = [{ id: "xai", name: "xAI" },{ id: "mistral", name: "Mistral" },{ id: "corti", name: "Corti" },+ { id: "tinfoil", name: "Tinfoil" },{ id: "custom", name: "Custom" },];@@ -217,7 +218,8 @@ interface ProviderCredentialField {| "cortiClientId"| "cortiClientSecret"| "cortiEnvironment"- | "cortiTenant";+ | "cortiTenant"+ | "tinfoilApiKey";input: "secret" | "text" | "select";labelKey?: string;placeholder?: string;@@ -266,6 +268,10 @@ const PROVIDER_CREDENTIALS: Record<},],},+ tinfoil: {+ consoleUrl: "https://tinfoil.sh/inference?utm_source=referral&utm_campaign=openwhispr",+ fields: [{ key: "tinfoilApiKey", input: "secret" }],+ },};const VALID_CLOUD_PROVIDER_IDS = CLOUD_PROVIDER_TABS.map((p) => p.id);@@ -346,6 +352,8 @@ export default function TranscriptionModelPicker({const setCortiEnvironment = useSettingsStore((s) => s.setCortiEnvironment);const cortiTenant = useSettingsStore((s) => s.cortiTenant);const setCortiTenant = useSettingsStore((s) => s.setCortiTenant);+ const tinfoilApiKey = useSettingsStore((s) => s.tinfoilApiKey);+ const setTinfoilApiKey = useSettingsStore((s) => s.setTinfoilApiKey);const customTranscriptionApiKey = useSettingsStore((s) => s.customTranscriptionApiKey);const setCustomTranscriptionApiKey = useSettingsStore((s) => s.setCustomTranscriptionApiKey);const effectiveLocal = mode === "local" ? true : mode === "cloud" ? false : useLocalWhisper;@@ -714,6 +722,7 @@ export default function TranscriptionModelPicker({cortiClientSecret,cortiEnvironment,cortiTenant,+ tinfoilApiKey,};const credentialSetters: Record<ProviderCredentialField["key"], (value: string) => void> = {openaiApiKey: setOpenaiApiKey,@@ -724,6 +733,7 @@ export default function TranscriptionModelPicker({cortiClientSecret: setCortiClientSecret,cortiEnvironment: setCortiEnvironment,cortiTenant: setCortiTenant,+ tinfoilApiKey: setTinfoilApiKey,};const cloudModelOptions = useMemo(() => {diff --git a/src/helpers/audioManager.js b/src/helpers/audioManager.jsindex 6274b8680..0198e8999 100644--- a/src/helpers/audioManager.js+++ b/src/helpers/audioManager.js@@ -23,6 +23,7 @@ import {isCloudCleanupMode,isCloudDictationAgentMode,} from "../stores/settingsStore";+import { getTranscriptionProvider } from "../models/ModelRegistry";import { shouldSkipTranscriptionApiKey } from "./transcriptionAuth";import { detectAgentName } from "../config/agentDetection";import { resolveDictationRouteKind, resolveDictationAgentReachability } from "./dictationRouting";@@ -161,6 +162,26 @@ const STREAMING_PROVIDERS = {onError: (cb) => window.electronAPI.onCortiError(cb),onSessionEnd: (cb) => window.electronAPI.onCortiSessionEnd(cb),},+ "tinfoil-realtime": {+ warmup: (opts) =>+ window.electronAPI.dictationRealtimeWarmup({+ ...opts,+ provider: "tinfoil-realtime",+ preview: getSettings().showTranscriptionPreview,+ }),+ start: (opts) =>+ window.electronAPI.dictationRealtimeStart({+ ...opts,+ provider: "tinfoil-realtime",+ preview: getSettings().showTranscriptionPreview,+ }),+ send: (buf) => window.electronAPI.dictationRealtimeSend(buf),+ stop: () => window.electronAPI.dictationRealtimeStop(),+ onPartial: (cb) => window.electronAPI.onDictationRealtimePartial(cb),+ onFinal: (cb) => window.electronAPI.onDictationRealtimeFinal(cb),+ onError: (cb) => window.electronAPI.onDictationRealtimeError(cb),+ onSessionEnd: (cb) => window.electronAPI.onDictationRealtimeSessionEnd(cb),+ },};class AudioManager {@@ -312,6 +333,9 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);getStreamingProviderName() {const s = getSettings();+ if (s.cloudTranscriptionProvider === "tinfoil") {+ return "tinfoil-realtime";+ }if (s.cloudTranscriptionProvider === "corti" && s.cloudTranscriptionMode === "byok") {return "corti";}@@ -1060,6 +1084,18 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);throw err;}apiKey = null;+ } else if (provider === "tinfoil") {+ apiKey = s.tinfoilApiKey;+ if (!apiKey?.trim()) {+ apiKey = await window.electronAPI.getTinfoilKey?.();+ }+ if (!apiKey?.trim()) {+ const err = new Error(+ "Tinfoil API key not found. Please set your API key in the Control Panel."+ );+ err.code = "API_KEY_MISSING";+ throw err;+ }} else if (provider === "groq") {// Prefer store value (user-entered via UI) over main process (.env)apiKey = s.groqApiKey;@@ -2406,6 +2442,13 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);return !!(s.cortiClientId && s.cortiClientSecret);}+ // Tinfoil realtime streams without an OpenWhispr account.+ if (s.cloudTranscriptionProvider === "tinfoil") {+ const provider = getTranscriptionProvider("tinfoil");+ const model = provider?.models.find((m) => m.id === s.cloudTranscriptionModel);+ return !!model?.streaming && !!s.tinfoilApiKey;+ }+// For dictation/agent: respect sttConfig mode from the API — this allows// batch mode even for realtime-capable models (e.g. gpt-4o-mini-transcribe).if (this.context !== "notes" && this.sttConfig?.dictation?.mode === "batch") {diff --git a/src/helpers/environment.js b/src/helpers/environment.jsindex fb848787b..b87f7139b 100644--- a/src/helpers/environment.js+++ b/src/helpers/environment.js@@ -13,6 +13,7 @@ const SECRET_KEYS = ["GROQ_API_KEY","XAI_API_KEY","MISTRAL_API_KEY",+ "TINFOIL_API_KEY","ASSEMBLYAI_API_KEY","DEEPGRAM_API_KEY","CORTI_CLIENT_ID",@@ -313,6 +314,14 @@ class EnvironmentManager {return this._saveKey("MISTRAL_API_KEY", key);}+ getTinfoilKey() {+ return this._getKey("TINFOIL_API_KEY");+ }++ saveTinfoilKey(key) {+ return this._saveKey("TINFOIL_API_KEY", key);+ }+getAssemblyAIKey() {return this._getKey("ASSEMBLYAI_API_KEY");}diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex 1e112f056..12baf0ea2 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -14,7 +14,11 @@ const DeepgramStreaming = require("./deepgramStreaming");const CortiStreaming = require("./cortiStreaming");const OpenAIRealtimeStreaming = require("./openaiRealtimeStreaming");const { getCortiToken } = require("./cortiAuth");+const { createTinfoilRealtimeSocket } = require("./tinfoilSecureClient");const AudioStorageManager = require("./audioStorage");++// Tinfoil's only realtime STT model — fallback when the renderer omits one.+const TINFOIL_REALTIME_MODEL = "voxtral-mini-4b-realtime";const liveSpeakerIdentifier = require("./liveSpeakerIdentifier");const MeetingEchoLeakDetector = require("./meetingEchoLeakDetector");const { applySmartSpacing } = require("./smartSpacing");@@ -336,6 +340,7 @@ class IPCHandlers {this._dictationStreaming = null;this._dictationConnectPromise = null;this._dictationIdleTimer = null;+ this._dictationPreviewEnabled = false;this._meetingMicStreaming = null;this._meetingSystemStreaming = null;this._hotkeyCaptureMode = false;@@ -2742,6 +2747,14 @@ class IPCHandlers {});+ ipcMain.handle("get-tinfoil-key", async () => {+ return this.environmentManager.getTinfoilKey();+ });++ ipcMain.handle("save-tinfoil-key", async (event, key) => {+ return this.environmentManager.saveTinfoilKey(key);+ });+ipcMain.handle("get-custom-transcription-key", async () => {return this.environmentManager.getCustomTranscriptionKey();});@@ -4416,6 +4429,15 @@ class IPCHandlers {const { token } = await this._mintStoredCortiToken(options);return streams === 2 ? [token, token] : token;}+ if (options.provider === "tinfoil-realtime") {+ const apiKey = this.environmentManager.getTinfoilKey();+ if (!apiKey) {+ const err = new Error("No Tinfoil API key configured. Add your key in Settings.");+ err.code = "NO_API";+ throw err;+ }+ return streams === 2 ? [apiKey, apiKey] : apiKey;+ }if (options.mode === "byok") {const apiKey = this.environmentManager.getOpenAIKey();@@ -5276,12 +5298,21 @@ class IPCHandlers {};const setupDictationCallbacks = (streaming, event) => {- streaming.onPartialTranscript = (text) =>+ streaming.onPartialTranscript = (text) => {event.sender.send("dictation-realtime-partial", text);+ if (this._dictationPreviewEnabled && text) {+ this.windowManager.showTranscriptionPreview(text);+ }+ };streaming.onFinalTranscript = (text) => event.sender.send("dictation-realtime-final", text);- streaming.onError = (err) => event.sender.send("dictation-realtime-error", err.message);- streaming.onSessionEnd = (data) =>+ streaming.onError = (err) => {+ event.sender.send("dictation-realtime-error", err.message);+ if (this._dictationPreviewEnabled) this.windowManager.hideTranscriptionPreview();+ };+ streaming.onSessionEnd = (data) => {event.sender.send("dictation-realtime-session-end", data || {});+ if (this._dictationPreviewEnabled) this.windowManager.hideTranscriptionPreview();+ };};const DICTATION_IDLE_TIMEOUT_MS = 5 * 60 * 1000;@@ -5310,6 +5341,7 @@ class IPCHandlers {}clearDictationIdleTimer();+ this._dictationPreviewEnabled = !!options.preview;if (this._dictationStreaming) {await this._dictationStreaming.disconnect().catch(() => {});@@ -5318,14 +5350,28 @@ class IPCHandlers {const connectInner = async () => {const isCloud = options.mode !== "byok";- const apiKey = await fetchRealtimeToken(event, { mode: options.mode });+ const apiKey = await fetchRealtimeToken(event, {+ mode: options.mode,+ provider: options.provider,+ });const streaming = new OpenAIRealtimeStreaming();setupDictationCallbacks(streaming, event);- await streaming.connect({- apiKey,- model: options.model || "gpt-4o-mini-transcribe",- preconfigured: isCloud,- });+ if (options.provider === "tinfoil-realtime") {+ const model = options.model || TINFOIL_REALTIME_MODEL;+ await streaming.connect({+ apiKey,+ model,+ // The capture worklet emits 16kHz PCM; declare the true rate.+ inputRate: 16000,+ createSocket: () => createTinfoilRealtimeSocket({ model, apiKey }),+ });+ } else {+ await streaming.connect({+ apiKey,+ model: options.model || "gpt-4o-mini-transcribe",+ preconfigured: isCloud,+ });+ }this._dictationStreaming = streaming;};@@ -5767,6 +5813,7 @@ class IPCHandlers {ipcMain.handle("dictation-realtime-start", async (event, options = {}) => {try {clearDictationIdleTimer();+ this._dictationPreviewEnabled = !!options.preview;if (!this._dictationStreaming?.isConnected) await connectDictationStreaming(event, options);return { success: true };} catch (err) {@@ -5785,6 +5832,10 @@ class IPCHandlers {}const result = await this._dictationStreaming.disconnect().catch(() => ({ text: "" }));this._dictationStreaming = null;+ if (this._dictationPreviewEnabled) {+ this.windowManager.hideTranscriptionPreview();+ this._dictationPreviewEnabled = false;+ }return { success: true, text: result.text || "" };});diff --git a/src/helpers/openaiRealtimeStreaming.js b/src/helpers/openaiRealtimeStreaming.jsindex a6ecdfd5a..388b036e1 100644--- a/src/helpers/openaiRealtimeStreaming.js+++ b/src/helpers/openaiRealtimeStreaming.js@@ -6,6 +6,24 @@ const DISCONNECT_TIMEOUT_MS = 3000;const SAMPLE_RATE = 24000;const COLD_START_BUFFER_MAX = 3 * SAMPLE_RATE * 2; // 3 seconds of 16-bit PCM+// A socket factory does network work before the socket exists, so the dial+// must be bounded; a socket resolving after the deadline is closed, not leaked.+async function createSocketWithTimeout(createSocket, timeoutMs) {+ const socketPromise = createSocket();+ let timer;+ const timeout = new Promise((_, reject) => {+ timer = setTimeout(() => {+ socketPromise.then((socket) => socket?.close?.()).catch(() => {});+ reject(new Error("Realtime socket setup timeout"));+ }, timeoutMs);+ });+ try {+ return await Promise.race([socketPromise, timeout]);+ } finally {+ clearTimeout(timer);+ }+}+class OpenAIRealtimeStreaming {constructor() {this.ws = null;@@ -33,7 +51,7 @@ class OpenAIRealtimeStreaming {}async connect(options = {}) {- const { apiKey, model, preconfigured } = options;+ const { apiKey, model, preconfigured, inputRate, createSocket } = options;if (!apiKey) throw new Error("OpenAI API key is required");if (this.isConnected || this.isConnecting) {@@ -44,6 +62,7 @@ class OpenAIRealtimeStreaming {this.isConnecting = true;this.model = model || "gpt-4o-mini-transcribe";this.preconfigured = !!preconfigured;+ this.inputRate = inputRate || SAMPLE_RATE;this.completedSegments = [];this.currentPartial = "";this.audioBytesSent = 0;@@ -54,6 +73,18 @@ class OpenAIRealtimeStreaming {const url = "wss://api.openai.com/v1/realtime?intent=transcription";debugLogger.debug("OpenAI Realtime connecting", { model: this.model });+ // Attested providers (Tinfoil) supply their socket via an async factory.+ let ws;+ try {+ ws = createSocket+ ? await createSocketWithTimeout(createSocket, WEBSOCKET_TIMEOUT_MS)+ : new WebSocket(url, { headers: { Authorization: `Bearer ${apiKey}` } });+ } catch (err) {+ this.isConnecting = false;+ this.cleanup();+ throw err;+ }+return new Promise((resolve, reject) => {this.pendingResolve = resolve;this.pendingReject = reject;@@ -64,11 +95,7 @@ class OpenAIRealtimeStreaming {reject(new Error("OpenAI Realtime connection timeout"));}, WEBSOCKET_TIMEOUT_MS);- this.ws = new WebSocket(url, {- headers: {- Authorization: `Bearer ${apiKey}`,- },- });+ this.ws = ws;this.ws.on("open", () => {debugLogger.debug("OpenAI Realtime WebSocket opened");@@ -143,7 +170,7 @@ class OpenAIRealtimeStreaming {type: "transcription",audio: {input: {- format: { type: "audio/pcm", rate: SAMPLE_RATE },+ format: { type: "audio/pcm", rate: this.inputRate },transcription: { model: this.model },turn_detection: {type: "server_vad",diff --git a/src/helpers/tinfoilSecureClient.js b/src/helpers/tinfoilSecureClient.jsnew file mode 100644index 000000000..3b38fc71b--- /dev/null+++ b/src/helpers/tinfoilSecureClient.js@@ -0,0 +1,26 @@+// WebSocket access to Tinfoil's realtime transcription endpoint. The SDK's+// SecureClient attests the enclave and pins the socket's TLS connection to the+// attested key; one client is held per session so attestation is paid once.+let clientPromise = null;++function getSecureClient() {+ if (!clientPromise) {+ // ESM-only package, loaded from CommonJS.+ clientPromise = import("tinfoil").then(({ SecureClient }) => new SecureClient());+ // Don't cache a failed import — the next dictation should retry.+ clientPromise.catch(() => {+ clientPromise = null;+ });+ }+ return clientPromise;+}++async function createTinfoilRealtimeSocket({ model, apiKey }) {+ const client = await getSecureClient();+ const path = `/v1/realtime?model=${encodeURIComponent(model)}&intent=transcription`;+ return client.createWebSocket(path, {+ wsOptions: { headers: { Authorization: `Bearer ${apiKey}` } },+ });+}++module.exports = { createTinfoilRealtimeSocket };diff --git a/src/hooks/useSettings.ts b/src/hooks/useSettings.tsindex e8e5a4849..97a21c18d 100644--- a/src/hooks/useSettings.ts+++ b/src/hooks/useSettings.ts@@ -67,6 +67,7 @@ export interface ApiKeySettings {mistralApiKey: string;cortiClientId: string;cortiClientSecret: string;+ tinfoilApiKey: string;customTranscriptionApiKey: string;cleanupCustomApiKey: string;}@@ -243,6 +244,7 @@ function useSettingsInternal() {groqApiKey: store.groqApiKey,xaiApiKey: store.xaiApiKey,mistralApiKey: store.mistralApiKey,+ tinfoilApiKey: store.tinfoilApiKey,dictationKey: store.dictationKey,meetingKey: store.meetingKey,voiceAgentKey: store.voiceAgentKey,diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 2d63051b3..62941e205 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -1862,7 +1862,8 @@"groq_whisper_large_v3_turbo": "216x Echtzeitgeschwindigkeit","mistral_voxtral_mini_latest": "Schnelle mehrsprachige Transkription","corti_transcribe": "Medizinische Transkription in klinischer Qualität",- "xai_grok_stt": "Hochpräzise Spracherkennung von xAI"+ "xai_grok_stt": "Hochpräzise Spracherkennung von xAI",+ "tinfoil_voxtral_mini_realtime": "Nachweisbar private Streaming-Transkription"},"cloud": {"openai_gpt_5_2": "Starkes Reasoning-Modell",diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 79b6fec39..5ba722519 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -1954,7 +1954,8 @@"groq_whisper_large_v3_turbo": "216x real-time speed","mistral_voxtral_mini_latest": "Fast multilingual transcription","corti_transcribe": "Clinical-grade medical transcription",- "xai_grok_stt": "High-accuracy speech recognition by xAI"+ "xai_grok_stt": "High-accuracy speech recognition by xAI",+ "tinfoil_voxtral_mini_realtime": "Verifiably private streaming transcription"},"cloud": {"openai_gpt_5_2": "Strong reasoning model",diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex 9051c9295..50840e640 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -1910,7 +1910,8 @@"groq_whisper_large_v3_turbo": "Velocidad 216x en tiempo real","mistral_voxtral_mini_latest": "Transcripción multilingüe rápida","corti_transcribe": "Transcripción médica de nivel clínico",- "xai_grok_stt": "Reconocimiento de voz de alta precisión por xAI"+ "xai_grok_stt": "Reconocimiento de voz de alta precisión por xAI",+ "tinfoil_voxtral_mini_realtime": "Transcripción en streaming verificablemente privada"},"cloud": {"openai_gpt_5_2": "Modelo fuerte de razonamiento",diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex 4c3f35828..1ca1adef6 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -1910,7 +1910,8 @@"groq_whisper_large_v3_turbo": "Vitesse 216x en temps réel","mistral_voxtral_mini_latest": "Transcription multilingue rapide","corti_transcribe": "Transcription médicale de qualité clinique",- "xai_grok_stt": "Reconnaissance vocale haute précision par xAI"+ "xai_grok_stt": "Reconnaissance vocale haute précision par xAI",+ "tinfoil_voxtral_mini_realtime": "Transcription en streaming vérifiablement privée"},"cloud": {"openai_gpt_5_2": "Modèle de raisonnement performant",diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 824a5bc56..118e1a188 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -1862,7 +1862,8 @@"groq_whisper_large_v3": "Modello Large v3, veloce e preciso","mistral_voxtral_mini_latest": "Trascrizione multilingue veloce","corti_transcribe": "Trascrizione medica di livello clinico",- "xai_grok_stt": "Riconoscimento vocale ad alta precisione di xAI"+ "xai_grok_stt": "Riconoscimento vocale ad alta precisione di xAI",+ "tinfoil_voxtral_mini_realtime": "Trascrizione in streaming verificabilmente privata"},"cloud": {"openai_gpt_5_2": "Modello di ragionamento potente",diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 701ad753e..e70e63ddc 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -1862,7 +1862,8 @@"groq_whisper_large_v3": "Large v3 モデル、高速かつ高精度","mistral_voxtral_mini_latest": "高速多言語文字起こし","corti_transcribe": "臨床グレードの医療文字起こし",- "xai_grok_stt": "xAIによる高精度音声認識"+ "xai_grok_stt": "xAIによる高精度音声認識",+ "tinfoil_voxtral_mini_realtime": "検証可能なプライベート・ストリーミング文字起こし"},"cloud": {"openai_gpt_5_2": "強力な推論モデル",diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex e627b2eef..9e3554e20 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -1841,7 +1841,8 @@"groq_whisper_large_v3": "Modelo Large v3, rápido e preciso","mistral_voxtral_mini_latest": "Transcrição multilíngue rápida","corti_transcribe": "Transcrição médica de nível clínico",- "xai_grok_stt": "Reconhecimento de voz de alta precisão pela xAI"+ "xai_grok_stt": "Reconhecimento de voz de alta precisão pela xAI",+ "tinfoil_voxtral_mini_realtime": "Transcrição em streaming verificavelmente privada"},"cloud": {"openai_gpt_5_2": "Modelo forte de raciocínio",diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex 34f68fbad..8d71af0b2 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -1862,7 +1862,8 @@"groq_whisper_large_v3": "Модель Large v3, быстрая и точная","mistral_voxtral_mini_latest": "Быстрая многоязычная транскрипция","corti_transcribe": "Медицинская транскрипция клинического уровня",- "xai_grok_stt": "Высокоточное распознавание речи от xAI"+ "xai_grok_stt": "Высокоточное распознавание речи от xAI",+ "tinfoil_voxtral_mini_realtime": "Проверяемо приватная потоковая транскрипция"},"cloud": {"openai_gpt_5_2": "Сильная модель рассуждения",diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex 3ae063fa6..ee4bde64d 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -1857,7 +1857,8 @@"groq_whisper_large_v3": "Large v3 模型,快速且精准","mistral_voxtral_mini_latest": "快速多语言转录","corti_transcribe": "临床级医疗转录",- "xai_grok_stt": "xAI 高精度语音识别"+ "xai_grok_stt": "xAI 高精度语音识别",+ "tinfoil_voxtral_mini_realtime": "可验证的私密流式转录"},"cloud": {"openai_gpt_5_2": "强大的推理模型",diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 87fd476a0..ceb3b2e33 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -1857,7 +1857,8 @@"groq_whisper_large_v3": "Large v3 模型,快速且精準","mistral_voxtral_mini_latest": "快速多語言轉錄","corti_transcribe": "臨床級醫療轉錄",- "xai_grok_stt": "xAI 高精度語音辨識"+ "xai_grok_stt": "xAI 高精度語音辨識",+ "tinfoil_voxtral_mini_realtime": "可驗證的私密串流轉錄"},"cloud": {"openai_gpt_5_2": "強大的推理模型",diff --git a/src/models/modelRegistryData.json b/src/models/modelRegistryData.jsonindex 7077f57cf..7f453802c 100644--- a/src/models/modelRegistryData.json+++ b/src/models/modelRegistryData.json@@ -218,6 +218,20 @@"streaming": true}]+ },+ {+ "id": "tinfoil",+ "name": "Tinfoil",+ "baseUrl": "https://inference.tinfoil.sh/v1",+ "models": [+ {+ "id": "voxtral-mini-4b-realtime",+ "name": "Voxtral Mini Realtime",+ "description": "Verifiably private streaming transcription",+ "descriptionKey": "models.descriptions.transcription.tinfoil_voxtral_mini_realtime",+ "streaming": true+ }+ ]}],"cloudProviders": [diff --git a/src/services/ReasoningService.ts b/src/services/ReasoningService.tsindex 42bdc4572..a9f7df3e2 100644--- a/src/services/ReasoningService.ts+++ b/src/services/ReasoningService.ts@@ -880,7 +880,7 @@ class ReasoningService extends BaseReasoningService {}clearApiKeyCache(- provider?: "openai" | "anthropic" | "gemini" | "groq" | "mistral" | "custom"+ provider?: "openai" | "anthropic" | "gemini" | "groq" | "mistral" | "tinfoil" | "custom"): void {if (provider) {if (provider !== "custom") {diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.tsindex eb4e9eaa0..a9909aee6 100644--- a/src/stores/settingsStore.ts+++ b/src/stores/settingsStore.ts@@ -569,6 +569,7 @@ export interface SettingsStatesetMistralApiKey: (key: string) => void;setCortiClientId: (key: string) => void;setCortiClientSecret: (key: string) => void;+ setTinfoilApiKey: (key: string) => void;setCustomTranscriptionApiKey: (key: string) => void;setCleanupCustomApiKey: (key: string) => void;@@ -760,6 +761,7 @@ const SECRET_IPC_SAVERS = {mistral: "saveMistralKey",cortiClientId: "saveCortiClientId",cortiClientSecret: "saveCortiClientSecret",+ tinfoil: "saveTinfoilKey",customTranscription: "saveCustomTranscriptionKey",cleanupCustom: "saveCleanupCustomKey",bedrockAccessKeyId: "saveBedrockAccessKeyId",@@ -800,6 +802,7 @@ const STALE_SECRET_LOCALSTORAGE_KEYS = ["mistralApiKey","cortiClientId","cortiClientSecret",+ "tinfoilApiKey","customTranscriptionApiKey","customReasoningApiKey","cleanupCustomApiKey",@@ -811,7 +814,7 @@ const STALE_SECRET_LOCALSTORAGE_KEYS = [] as const;function invalidateApiKeyCaches(- provider?: "openai" | "anthropic" | "gemini" | "groq" | "mistral" | "custom"+ provider?: "openai" | "anthropic" | "gemini" | "groq" | "mistral" | "tinfoil" | "custom") {if (provider) {if (_ReasoningService) {@@ -880,6 +883,7 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({mistralApiKey: "",cortiClientId: "",cortiClientSecret: "",+ tinfoilApiKey: "",customTranscriptionApiKey: "",cleanupCustomApiKey: "",@@ -1320,6 +1324,11 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({},setCortiEnvironment: createStringSetter("cortiEnvironment"),setCortiTenant: createStringSetter("cortiTenant"),+ setTinfoilApiKey: (key: string) => {+ set({ tinfoilApiKey: key });+ debouncedSaveSecret("tinfoil", key);+ invalidateApiKeyCaches("tinfoil");+ },setCustomTranscriptionApiKey: (key: string) => {set({ customTranscriptionApiKey: key });debouncedSaveSecret("customTranscription", key);@@ -1708,6 +1717,7 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({if (keys.mistralApiKey !== undefined) s.setMistralApiKey(keys.mistralApiKey);if (keys.cortiClientId !== undefined) s.setCortiClientId(keys.cortiClientId);if (keys.cortiClientSecret !== undefined) s.setCortiClientSecret(keys.cortiClientSecret);+ if (keys.tinfoilApiKey !== undefined) s.setTinfoilApiKey(keys.tinfoilApiKey);if (keys.customTranscriptionApiKey !== undefined)s.setCustomTranscriptionApiKey(keys.customTranscriptionApiKey);if (keys.cleanupCustomApiKey !== undefined) s.setCleanupCustomApiKey(keys.cleanupCustomApiKey);@@ -1956,6 +1966,7 @@ export async function initializeSettings(): Promise<void> {mistral,cortiClientId,cortiClientSecret,+ tinfoil,customTx,customRx,bedrockAccessKeyId,@@ -1972,6 +1983,7 @@ export async function initializeSettings(): Promise<void> {window.electronAPI.getMistralKey?.(),window.electronAPI.getCortiClientId?.(),window.electronAPI.getCortiClientSecret?.(),+ window.electronAPI.getTinfoilKey?.(),window.electronAPI.getCustomTranscriptionKey?.(),window.electronAPI.getCleanupCustomKey?.(),window.electronAPI.getBedrockAccessKeyId?.(),@@ -1990,6 +2002,7 @@ export async function initializeSettings(): Promise<void> {mistralApiKey: mistral || "",cortiClientId: cortiClientId || "",cortiClientSecret: cortiClientSecret || "",+ tinfoilApiKey: tinfoil || "",customTranscriptionApiKey: customTx || "",cleanupCustomApiKey: customRx || "",bedrockAccessKeyId: bedrockAccessKeyId || "",diff --git a/src/types/electron.ts b/src/types/electron.tsindex 4f6b43f27..a409e7dfd 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -1029,6 +1029,8 @@ declare global {environment: string;tenant: string;}) => Promise<{ text: string }>;+ getTinfoilKey?: () => Promise<string | null>;+ saveTinfoilKey?: (key: string) => Promise<void>;// Custom endpoint API keysgetCustomTranscriptionKey?: () => Promise<string | null>;diff --git a/src/utils/providerIcons.ts b/src/utils/providerIcons.tsindex f9aba8db5..0b9d764f4 100644--- a/src/utils/providerIcons.ts+++ b/src/utils/providerIcons.ts@@ -13,6 +13,7 @@ import azureIcon from "@/assets/icons/providers/azure.svg";import vertexIcon from "@/assets/icons/providers/vertex.svg";import xaiIcon from "@/assets/icons/providers/xai.svg";import cortiIcon from "@/assets/icons/providers/corti.svg";+import tinfoilIcon from "@/assets/icons/providers/tinfoil.svg";export const PROVIDER_ICONS: Record<string, string> = {openai: openaiIcon,@@ -31,6 +32,7 @@ export const PROVIDER_ICONS: Record<string, string> = {vertex: vertexIcon,xai: xaiIcon,corti: cortiIcon,+ tinfoil: tinfoilIcon,};export function getProviderIcon(provider: string): string | undefined {@@ -44,6 +46,7 @@ export const MONOCHROME_PROVIDERS = ["openai-oss","xai","corti",+ "tinfoil",] as const;export function isMonochromeProvider(provider: string): boolean {