ci: prepare native language and keyboard test prerequisites

This commit is contained in:
public-repo-gate
2026-09-13 16:16:41 +03:00
parent 7c1bf5a5ad
commit 50a5d4cedf
9 changed files with 4231 additions and 3907 deletions
+8
View File
@@ -78,6 +78,14 @@ jobs:
- name: Check workflow guards offline
run: ruby scripts/macos_release_workflow_test.rb --selftest
- name: Prepare hosted macOS integration environment
run: |
set -euo pipefail
[[ "${GITHUB_ACTIONS:-}" == true && "${RUNNER_ENVIRONMENT:-}" == github-hosted && "${RUNNER_OS:-}" == macOS ]] \
|| { echo 'Fixture writes require a GitHub-hosted macOS runner.'; exit 1; }
xcrun swift scripts/macos_ci_environment.swift --prepare-hosted
xcrun swift scripts/macos_ci_environment.swift --check
- name: Run tests without parallel test execution
run: swift test --no-parallel --jobs 2
+17 -11
View File
@@ -7,7 +7,9 @@
This is the icon that will sit in your menu bar. A marble mountain and a voice gathered into a glass capsule above it: what you say turns into text right here, on your machine, and goes nowhere else.
This walkthrough assumes you have never installed a menu bar app that listens to your keyboard. Every step says what to type or press and what you should see afterwards. If your screen shows something else, stop at that step: the answer sits in the difference, not further down the page.
You need a Mac on macOS 14 or newer, and about half a gigabyte of free disk for the speech model. Building from source also wants Xcode with Swift 6. Nothing gets installed behind your back at any point.
You need an Apple Silicon Mac on macOS 14 or newer, with space for a roughly 500 MB speech model and its temporary download files. This download does not support Intel. Building from source uses the tested Xcode 26.6 toolchain (macOS 26 SDK, Swift 6.3.3); the ready DMG needs no Xcode or Terminal.
For the current download, first launch, model recovery and manual updates, follow the [installation guide](DOWNLOAD.md). The walkthrough below explains the app's other screens.
1. **Get the app. Two doors, either one works.** The short door is the ready disk image from [Releases](https://github.com/zarubinvibe/iriz/releases): download the `.dmg`, open it, drag the icon onto `Applications`. Inside that image sit two objects and an arrow between them, nothing else.
@@ -21,7 +23,7 @@ You need a Mac on macOS 14 or newer, and about half a gigabyte of free disk for
You see a short introduction, then a list of what your machine has and what it lacks: `swift`, `python3`, `git`, and the macOS version. Then the tree runs its own selfcheck, `scripts/selfcheck.sh`. Then one line naming the next command. Without a flag the installer compiles nothing and installs nothing, so you can run it before deciding whether you want the product at all. If you want to see the network promise checked rather than stated, run `scripts/offline_binary_gate.sh` on the app built by `install.sh`.
No Git on the machine? Download the [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip), unpack it, run the same command inside the folder. Doing any of this for the first time? Open the project in Claude Code and run `/iriz-setup`: the install goes as a conversation, one question at a time.
You can also download the source [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip), unpack it and run the same command inside the folder. The installer still requires Git. Doing any of this for the first time? Open the project in Claude Code and run `/iriz-setup`: the install goes as a conversation, one question at a time.
2. **Build it, if you took the source door.**
@@ -31,23 +33,25 @@ You need a Mac on macOS 14 or newer, and about half a gigabyte of free disk for
You see the build run. The first one pulls dependencies and takes a few minutes. At the end the app lands in `/Applications/iriz.app`, and the script tells you the icon is about to appear in the menu bar. Something you compiled yourself opens on a double click, so skip the next step and go to 4.
3. **Open a downloaded build for the first time.** There is no Apple Developer ID for this project, the build is not notarized, and macOS will refuse to start it. You get either "iriz can't be opened because Apple cannot check it for malicious software" or a nastier line claiming the app is damaged. The file is intact. The wording is the loudest one the system owns.
3. **Open a downloaded build for the first time.** This release is self-signed, not notarized by Apple. macOS cannot verify its publisher.
Control-click the icon in `Applications`, choose Open, then confirm Open in the dialog. If your macOS does not offer that (Apple dropped the shortcut after 14), go to System Settings, Privacy & Security, scroll to the line about the blocked app and press Open Anyway.
If macOS says the publisher cannot be verified or Apple cannot check the app, proceed only if you trust this repository and have checked the download. Try opening iriz from Applications, then use System Settings → Privacy & Security → Open Anyway. See [Apple's explanation](https://support.apple.com/en-us/102445).
You see the app start, and you are never asked again.
If macOS says the app is damaged, stop and download it again from the official release; do not assume the file is intact. Do not bypass a malware warning or disable Gatekeeper. If the warning remains, stop and report it.
4. **Walk the introduction window.** It opens by itself on first launch, one thought per screen, a button to move on. It shows you the shape of the thing: press a key, say a sentence, press the key again, and the text appears where the cursor was blinking. In an email, in a chat, in a terminal.
You also learn where it lives. The icon is at the top right of the screen, near the clock. No dock icon, no main window. History, dictionary and settings all open from that icon.
5. **Start the model download early.** On the **Install speech recognition** screen, press **Download and install Parakeet**. The app downloads Parakeet TDT v3, installs it and selects it for recognition. The model is not included in the DMG. Parakeet is the only model installed automatically; it does not recognize Chinese speech. Interface language and speech language are separate.
5. **Start the model download early.** Speech is decoded on your Mac, on the Neural Engine, by Parakeet TDT v3 converted to CoreML. The model is not packed into the image on purpose: it gets updated more often than the app is released, and a fresh one beats a year-old one you carried around. Press the button on this step.
The screen shows progress for the roughly 500 MB download and offers **Try again** after an error. You can continue to permissions while it downloads, but wait for **Model is in place** before trying dictation. Download time depends on the connection.
You see the download begin: around half a gigabyte, roughly five minutes on an ordinary connection. Do not sit and watch it. Keep walking the steps, because the permissions ahead take about the same time.
Skipped the model or need to retry later? Open **iriz → Settings → Dictation → Download Parakeet model…**. If a model is already installed, the button reads **Set up speech recognition…**. Other engines require separate model installation, outside this guide.
The next screen explains where iriz lives. The icon is at the top right of the screen, near the clock. No dock icon, no main window. History, dictionary and settings all open from that icon. Continue from there to permissions.
6. **Microphone.** Press the button on this step and answer the system prompt.
You see the step switch to granted. Without the microphone nothing is heard, so this one comes first. The sound is never written to disk: it lives exactly as long as it takes to turn it into letters.
You see the step switch to granted. Without microphone access, iriz cannot hear your voice for dictation.
7. **Accessibility.** macOS calls this one Accessibility, and pasting text into somebody else's field needs it. The button on this step opens the right list in System Settings. Find iriz there and flip the switch yourself, because the system does not allow the app to do it.
@@ -59,7 +63,7 @@ You need a Mac on macOS 14 or newer, and about half a gigabyte of free disk for
You also get the first function for free at this point. Type `ghbdtn` into any field and watch it turn into `привет` on its own, no key pressed.
9. **Say your first sentence.** The next step shows your dictation key and a field to test it in. Press the key, say something out loud, press it again. "Hello, this is a test, can you hear me" is plenty.
9. **Say your first sentence.** Once the model is ready, the next step shows your dictation key and a field to test it in. Press the key, say something out loud, press it again. "Hello, this is a test, can you hear me" is plenty.
You see the words land in that field a moment later. While this window is open the text goes only there and nowhere else. If pressing the key does nothing, the app tells you straight that it cannot hear the key yet: the Input Monitoring switch did not take, go back a step. If that key is already taken by another program, the same screen lets you pick a different one.
@@ -75,7 +79,9 @@ You need a Mac on macOS 14 or newer, and about half a gigabyte of free disk for
## Keeping it current
When a new version comes out, do not clone the project again: open it in Claude Code and run `/iriz-update`. It shows what changed before touching a single file, pulls only fast-forward changes, and re-checks itself afterwards. Your settings, dictionary and history sit outside the project folder, so an update does not reach them.
For a DMG installation, follow [manual updating and rollback](DOWNLOAD.md#update-or-go-back): quit iriz before replacing it, and keep the previous app or image until the new one works.
If you build from source, open the project in Claude Code and run `/iriz-update`. It shows what changed before touching a single file, pulls only fast-forward changes, and re-checks itself afterwards. Your settings, dictionary and history sit outside the project folder, so an update does not reach them.
There is no auto-update inside the app itself, and there will not be one while the build carries no Apple signature. A downloaded build is opened by hand once, as in step 3.
+24 -20
View File
@@ -7,15 +7,17 @@
Вот значок, который появится у вас в строке меню. Мраморная гора и голос, собранный в стеклянную капсулу над ней: сказанное превращается в текст прямо здесь, на вашей машине, и никуда не улетает.
Этот путь написан для человека, который ставит iriz первый раз в жизни. В каждом шаге сказано, что нажать или набрать, и что после этого появится на экране. Увидели другое, чем написано, остановитесь прямо там. Ответ лежит в этом расхождении, а не ниже по странице.
Нужен Мак на macOS 14 или новее. Если решите собирать из исходников, понадобится еще Xcode со Swift 6. Больше ничего заранее ставить не надо.
Нужен Мак с Apple Silicon на macOS 14 или новее, с местом для модели примерно на 500 МБ и временных файлов загрузки. Этот файл не поддерживает Intel. Для сборки из исходников используется проверенный Xcode 26.6 (macOS 26 SDK, Swift 6.3.3); готовому DMG Xcode и терминал не нужны.
Как скачать приложение, пройти первый запуск, восстановить модель и обновиться вручную, описано в [инструкции установки](DOWNLOAD.ru.md). Ниже разобраны остальные экраны приложения.
1. **Посмотрите, какая у вас система.** Меню Apple в левом верхнем углу, пункт «Об этом Маке».
Откроется окно с названием и номером версии. Нужна 14 или новее. Версия старше, дальше идти незачем: приложение на ней не запустится.
2. **Скачайте образ.** Откройте [страницу выпусков](https://github.com/zarubinvibe/iriz/releases) и возьмите верхний. Файлов на выбор два: `iriz-<версия>-arm64.dmg` для Маков на Apple Silicon и `iriz-<версия>-universal.dmg`, внутри которого оба среза. Не знаете, какой у вас процессор, берите universal.
2. **Скачайте образ.** Возьмите [DMG для Apple Silicon](https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg). На странице выпуска он также доступен как `iriz-<версия>-arm64.dmg`. Этот выпуск не предназначен для Intel; universal-образ в него не входит.
В «Загрузках» появится файл на десяток мегабайт. Так и должно быть. Модель распознавания в образ не кладется намеренно, приложение скачает ее само на шаге 7.
В «Загрузках» появится файл на десяток мегабайт. Так и должно быть. Модель распознавания в образ не кладется: приложение скачает и установит ее по кнопке на шаге 7.
3. **Перетащите значок в Applications.** Двойной щелчок по скачанному `.dmg`.
@@ -35,29 +37,29 @@
bash install.sh --build
```
Первая сборка тянет зависимости и идет несколько минут. В конце готовое приложение окажется в `/Applications`, а значок появится в строке меню. Нет git, скачайте [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip), распакуйте и запустите ту же команду внутри распакованной папки.
Первая сборка тянет зависимости и идет несколько минут. В конце готовое приложение окажется в `/Applications`, а значок появится в строке меню. Исходники можно также скачать как [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip), распаковать и запустить ту же команду внутри папки. Установщику все равно нужен git.
5. **Откройте приложение первый раз.** Тут macOS упрется, и лучше знать об этом заранее. У проекта нет Apple Developer ID, сборка не нотаризована, и на все скачанное из сети система вешает метку карантина.
5. **Откройте приложение первый раз.** У этого выпуска самоподпись, нотаризации Apple нет. macOS не подтверждает издателя.
Двойной щелчок по `iriz` в `Applications` даст окно вида «Не удалось открыть „iriz“, так как Apple не может проверить его на наличие вредоносного ПО». Реже система пишет, что файл поврежден. Файл цел, это ее самая пугающая формулировка для ненотаризованного приложения.
Если macOS пишет, что издатель не подтвержден или Apple не может проверить приложение, продолжайте только если доверяете репозиторию и проверили скачанный файл. Попробуйте открыть iriz из Applications, затем выберите **Системные настройки → Конфиденциальность и безопасность → Все равно открыть**. [Объяснение Apple](https://support.apple.com/en-us/102445).
Правый щелчок по значку, пункт **«Открыть»**, в появившемся диалоге еще раз **«Открыть»**. На macOS 15 и новее этого пункта может не быть: тогда откройте **Системные настройки → Конфиденциальность и безопасность**, пролистайте вниз до строки про заблокированное приложение и нажмите **«Все равно открыть»**. Запасной путь, работающий на всех версиях:
```bash
find /Applications/iriz.app -exec xattr -d com.apple.quarantine {} \; 2>/dev/null
```
Если macOS сообщает, что приложение повреждено, остановитесь и скачайте его заново из официального выпуска; считать файл целым без проверки нельзя. Не обходите предупреждение о вредоносном ПО и не отключайте Gatekeeper. Если предупреждение осталось, прекратите запуск и сообщите о проблеме.
Собрали сами на шаге 4, весь этот шаг вас не касается: на такую сборку карантин не вешается.
Что вы увидите: значок в строке меню наверху справа, рядом с часами, и окно **«Знакомство с iriz»**.
6. **Пройдите два первых экрана.** Кнопка **«Дальше»** внизу окна.
6. **Прочитайте первый экран.** Кнопка **«Дальше»** внизу окна ведет к установке модели.
Первый экран говорит, что программа делает: нажали клавишу, сказали фразу, нажали еще раз, текст встал туда, где мигал курсор. Второй объясняет, где она живет. Отдельного окна у нее нет, в доке ее нет тоже. История, словарь и настройки открываются из значка в строке меню.
Первый экран говорит, что программа делает: нажали клавишу, сказали фразу, нажали еще раз, текст встал туда, где мигал курсор.
7. **Скачайте распознавание.** Экран **«Скачаем распознавание»**, кнопка **«Скачать модель»**.
7. **Скачайте распознавание.** Экран **«Установи распознавание речи»**, кнопка **«Скачать и установить Parakeet»**. Приложение скачает, установит и выберет Parakeet для распознавания.
Поедет около полугигабайта, на обычном канале минут пять. Ждать не нужно: жмите «Дальше» и выдавайте разрешения, пока она едет. Когда доедет, на этом экране встанет **«Модель на месте»**. Если загрузка сорвалась, там же появится **«Попробовать снова»**. Это единственный поход приложения в сеть, и запускаете его вы кнопкой.
Скачается около 500 МБ; скорость зависит от соединения, прогресс виден на экране. Пока идет загрузка, можно нажать «Дальше» и выдать разрешения. Перед первой диктовкой дождитесь **«Модель на месте»**. После ошибки есть **«Попробовать снова»**.
Пропустили модель или хотите повторить загрузку позже? Откройте **iriz → Настройки → Диктовка → Скачать модель Parakeet…**. Если модель уже установлена, кнопка называется **«Настроить распознавание…»**. Автоматическая установка есть только для Parakeet; он не распознает китайскую речь. Другим движкам нужна отдельная установка модели, не описанная здесь. Язык интерфейса и язык речи настраиваются отдельно.
Следующий экран объясняет, где живет iriz. Отдельного окна у нее нет, в доке ее нет тоже. История, словарь и настройки открываются из значка в строке меню. После этого переходите к разрешениям.
8. **Разрешите микрофон.** Экран **«Нужен микрофон»**, кнопка **«Разрешить микрофон»**.
@@ -71,7 +73,7 @@
Сразу после включения приложение перезапустится само. Так требует macOS, это не поломка. Окно знакомства откроется снова на том же месте. Без этого разрешения программа не видит нажатий вообще: ни клавиши диктовки, ни слова, набранного не в той раскладке.
11. **Продиктуйте первую фразу прямо в окне.** Экран **«Попробуй прямо сейчас»**. Нажмите правый ⌘ (клавиша Command справа от пробела), скажите что-нибудь вслух, нажмите ее еще раз.
11. **Продиктуйте первую фразу прямо в окне.** Дождитесь готовности модели. Экран **«Попробуй прямо сейчас»**. Нажмите правый ⌘ (клавиша Command справа от пробела), скажите что-нибудь вслух, нажмите ее еще раз.
Скажите, например: «Привет, это проверка. Слышишь меня хорошо?» Пока говорите, увидите подсказку «слушаю, говори». После второго нажатия появится «разбираю сказанное», а следом ваш текст в поле окна. Пока знакомство открыто, текст пишется только сюда и никуда больше. Клавиша занята другой программой, там же есть **«Клавиша занята? Поменять»**.
@@ -92,7 +94,9 @@
## Как обновляться дальше
Когда выйдет новая версия, не начинайте с чистого листа. Откройте проект в Claude Code и запустите `/iriz-update`. Он сначала покажет, что изменится, потянет изменения только вперед и не тронет ваши настройки, словарь и надиктовки.
Для установки из DMG используйте [инструкцию ручного обновления и возврата](DOWNLOAD.ru.md#обновление-и-возврат): закройте iriz перед заменой и сохраните прежнее приложение или образ, пока не проверите новое.
Если собираете из исходников, откройте проект в Claude Code и запустите `/iriz-update`. Он сначала покажет, что изменится, потянет изменения только вперед и не тронет ваши настройки, словарь и надиктовки.
## Если это помогло
@@ -104,7 +108,7 @@
## Как это выглядит
Каждая поверхность снята прибором из живого приложения: `iriz --capture-docs`. Не рисунок и не макет — то же окно, что откроется у вас.
Каждая поверхность снята прибором из живого приложения: `iriz --capture-docs`. Не рисунок и не макет: то же окно, что откроется у вас.
### Плашка
@@ -114,11 +118,11 @@
<p align="center"><img src="assets/shots/plate-listening-dark.png" alt="Плашка на записи: широкая капсула, внутри стекла бежит зеленая звуковая волна" width="70%"></p>
Так — пока вы говорите. Волна внутри стекла и есть ответ на вопрос «слышит ли меня».
Так выглядит капля, пока вы говорите. Волна внутри стекла и есть ответ на вопрос «слышит ли меня».
<p align="center"><img src="assets/shots/plate-hover-dark.png" alt="Плашка раскрыта в ряд из шести круглых кнопок: микрофон, промпт, перевод, RU, история, настройки" width="100%"></p>
Наведите мышь — капля раскроется в ряд кнопок: запись, промпт, перевод, язык, история, настройки. Плашку можно перетащить, она примагнитится к одному из двенадцати мест по краям экрана.
Наведите мышь, и капля раскроется в ряд кнопок: запись, промпт, перевод, язык, история, настройки. Плашку можно перетащить, она примагнитится к одному из двенадцати мест по краям экрана.
<p align="center"><img src="assets/shots/plate-open-text-dark.png" alt="Раскрытая панель плашки: текст на плотной подложке, кнопка «Скопировать», крестик и ряд кнопок внизу" width="100%"></p>
+22 -12
View File
@@ -7,9 +7,11 @@
这就是将来出现在你菜单栏里的图标。一座大理石的山,山上方是收进玻璃舱的声音:你说的话就在这台机器上变成文字,不去别处。
这份引导假设你从来没有装过这一类应用。每一步都写清楚你要做什么,以及之后屏幕上应该出现什么。看到的东西对不上,就停在那一步:答案在这个差别里,不在页面下面。
你需要一台 macOS 14 或更高的 Mac、大约 500 MB 空闲磁盘,还有三项系统权限:麦克风、辅助功能、输入监控。每一项在下面都会点名,说清楚它到底用来干什么。
你需要一台装有 macOS 14 或更新版本的 Apple Silicon Mac,以及约 500 MB 模型和下载临时文件所需的空间。此下载不支持 Intel。还需要三项系统权限:麦克风、辅助功能、输入监控。每一项在下面都会点名,说清楚它到底用来干什么。
有件事先摆在前面,免得你走到第九步才发现:语音模型 Parakeet TDT v3 覆盖 18 种欧洲语言,里面没有中文;布局纠正只处理英文和俄语这一对;应用界面目前也只有俄语。下面每个俄语按钮后面都跟一个中文对照,照着点就行。
当前下载、首次启动、模型恢复和手动更新请以[安装指南](DOWNLOAD.zh.md)为准。下面继续介绍应用的其他界面。
有件事先摆在前面,免得你走到第九步才发现:Parakeet 不识别中文语音;布局纠正只处理英文和俄语这一对。界面支持俄语、英语和简体中文,界面语言与语音语言是两项独立设置。下文保留部分俄语按钮名称及中文对照。
1. **先问问这台 Mac 合不合适。** 打开「终端」(在 应用程序 → 实用工具 里),输入并回车:
@@ -19,11 +21,11 @@
你会看到一个版本号,比如 `15.5`。是 14 或更大就往下走。小于 14 就到此为止,后面的步骤在你机器上不会成立。
2. **拿到应用。** 最省事的一条路:到 [Releases](https://github.com/zarubinvibe/iriz/releases) 下载 `.dmg`。Apple 芯片选 `iriz-<版本>-arm64.dmg`,拿不准就选 `iriz-<版本>-universal.dmg`,两个切片都在里面(Intel 从来没在真机上测过,作者手上没有那样一台)。双击镜像,把 iriz 图标拖到旁边的 `Applications` 上。
2. **拿到应用。** 下载 [Apple Silicon DMG](https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg)。发布页也提供同一文件的版本名 `iriz-<版本>-arm64.dmg`。此版本不支持 Intel,也不提供 universal 映像。双击镜像,把 iriz 图标拖到旁边的 `Applications` 上。
你会看到一个窗口,里面只有两个图标和中间一个箭头,再没有别的。镜像只有 10 MB 上下,因为语音模型不在里面——它在第六步才下载。同一个页面里还有 `.zip`,内容一样,解压后自己拖进 `应用程序`。
你会看到一个窗口,里面只有两个图标和中间一个箭头,再没有别的。镜像只有 10 MB 上下,因为语音模型不在里面——它在第六步由你点击按钮后下载。安装完成后推出映像,从 Applications 启动 iriz。GitHub 自动提供的源码 ZIP 不是可直接安装的应用。
3. **想自己构建就走这条,不想就跳到第四步。** 从源码装:
3. **想自己构建就走这条,不想就跳到第四步。** 源码构建使用已验证的 Xcode 26.6(macOS 26 SDK、Swift 6.3.3);现成 DMG 不需要 Xcode 或终端。从源码装:
```bash
git clone https://github.com/zarubinvibe/iriz.git ~/iriz
@@ -39,21 +41,27 @@
第一次构建要拉依赖,几分钟。跑完 `iriz.app` 就在 `/Applications` 里,用你自己钥匙串里的身份签名。第四步那点麻烦你也就绕过去了:隔离标记只加在从网上下载来的文件上。
4. **第一次打开下载来的构建,macOS 会拦你。** 这不是出错。项目没有 Apple Developer ID,构建没有经过公证,所以在系统眼里它跟一个陌生人签的没区别。
4. **第一次打开下载来的构建。** 此版本使用自签名,尚未通过 Apple 公证,macOS 无法验证发布者。
直接双击,你会看到「无法打开「iriz」,因为 Apple 无法检查其是否包含恶意软件」。别点「移到废纸篓」,文件是好的。正确的开法:在 `应用程序` 里按住 Control 点 iriz 图标,选「打开」,弹窗里再点一次「打开」。这次的弹窗比刚才多一个「打开」按钮。macOS 15 及以上如果没出现这个选项,就去 **系统设置 → 隐私与安全性**,往下滚到那条被拦住的提示,点「仍要打开」。开过一次以后,双击就是双击。
如果 macOS 提示无法验证发布者或 Apple 无法检查应用,仅在你信任此仓库并已核对下载文件时继续。尝试从 Applications 打开 iriz,然后前往 **系统设置 → 隐私与安全性 → 仍要打开**。请阅读 [Apple 的说明](https://support.apple.com/en-us/102445)。
如果 macOS 提示应用已损坏,先停止并从官方发布页重新下载,不要直接认定文件完好。不要绕过恶意软件警告,也不要关闭 Gatekeeper。警告仍然出现时,请停止启动并报告问题。
5. **图标出现在屏幕右上角,引导窗口自己弹出来。** iriz 没有主窗口,在程序坞里也别找:它住在菜单栏,时钟旁边。
你会看到一个标题为 `Знакомство с iriz`(和 iriz 认识一下)的窗口。一屏只讲一件事,底下三个按钮:`Дальше`(下一步)、`Назад`(上一步)、`Пропустить пока`(先跳过)。接下来的五步都在这个窗口里走完。
6. **下载语音识别模型。** 这一屏叫 `Скачаем распознавание`(下载识别),按钮是 `Скачать модель`(下载模型)。点它。
6. **下载语音识别模型。** 在**安装语音识别模型**页面点击**下载并安装 Parakeet**。应用会下载、安装并选用 Parakeet。
你会看到进度条开始走。大约 500 MB,普通网络五分钟左右,一辈子只下这一次。别坐着等:让它在后台跑,直接点 `Дальше` 去给权限,两件事并行。下完按钮那块会变成 `Модель на месте`(模型就位)。中途断了会出现 `Попробовать снова`(再试一次);它不会悄悄换一份别的文件来凑数,每次加载都逐个文件核对 SHA-256,对不上就报错停下。
页面显示约 500 MB 下载的进度,所需时间取决于连接。下载时可以继续授予权限,但开始听写前请等待**模型已就位**。失败后可点击**重试**。
如果跳过模型或稍后需要重试,打开 **iriz → 设置 → 口述 → 下载 Parakeet 模型…**。已有模型时,按钮显示为**设置语音识别…**。只有 Parakeet 支持自动安装,它不识别中文语音;其他引擎需要另行安装模型,本指南不介绍该过程。
下一屏介绍 iriz 在菜单栏的位置,以及如何打开历史、词典和设置。读完再继续授予权限。
7. **给麦克风权限。** 按钮 `Разрешить микрофон`(允许麦克风)。
你会看到 macOS 自己的询问框,点「好」。不给的话,布局纠正照常工作,听写用不了——它连声音都收不到。录下来的音频不落盘:从你按键到识别出文字,它只存在于内存里,之后就没了。
你会看到 macOS 自己的询问框,点「好」。不给麦克风权限的话,布局纠正照常工作,但应用无法收音,听写用不了。
8. **给「辅助功能」和「输入监控」。** 这两屏的按钮都是 `Открыть настройки системы`(打开系统设置):开关必须你自己拨,系统不允许应用代劳。
@@ -61,7 +69,7 @@
点第二个,到的是 **输入监控**。系统会警告说这个应用能看到所有程序里的按键,这句话是 macOS 写的,措辞也是它的。iriz 拿它做两件事:知道你按下了听写键,以及发现某个词敲错了布局。按键只在你这台 Mac 上处理,不保存也不外发,密码框里它完全不工作。**开关一拨,应用会自己重启一次**:窗口消失又出现。那是 macOS 的要求,引导在这一屏也提前跟你说了。
9. **试一次听写。** 引导会把你的听写键印在屏幕上,默认是右 ⌘。按一下,说句话,再按一下。
9. **试一次听写。** 模型就绪后再开始。引导会把你的听写键印在屏幕上,默认是右 ⌘。按一下,说句话,再按一下。
你会看到文字落进窗口里那个输入框,它原本的占位文字是 `тут появится то, что ты скажешь`(你说的话会出现在这里)。按了没动静?窗口会直接告诉你键盘权限还没给,并给一个按钮把你送回去补。这一步文字只进这个框;引导结束之后,它进的是你光标所在的任何地方——邮件、聊天窗口、终端,都一样。
@@ -87,7 +95,9 @@
## 以后怎么更新
以后出了新版本,不用把上面再走一遍:在 Claude Code 里打开这个项目,运行 `/iriz-update`。它先讲清楚会变什么,只做快进式更新,不动你的设置、词典和听写记录,更新完再自检一遍。没有 Claude Code 也行:`git pull` 之后 `bash install.sh --build`;走镜像那条路的,就下一个新的 `.dmg` 覆盖装上去。应用自己永远不会去问有没有新版本——那是一条对外的请求,而这里只允许存在一条,已经给了模型下载。
通过 DMG 安装的用户,请按[手动更新与回退指南](DOWNLOAD.zh.md#更新与回退)操作:替换应用前先退出 iriz,保留旧应用或映像,直到确认新版可用。
从源码构建的用户,可以在 Claude Code 里打开项目,运行 `/iriz-update`。它先讲清楚会变什么,只做快进式更新,不动你的设置、词典和听写记录,更新完再自检一遍。没有 Claude Code 也行:`git pull` 之后 `bash install.sh --build`。应用没有后台更新器。
## 如果这份引导帮到了你
+4
View File
@@ -33,6 +33,8 @@ shasum -a 256 -c SHA256SUMS.txt
`-` means ad-hoc signing, not a verified publisher. The normal local mode uses an existing self-signing certificate and a Finder window with an install arrow. That mode needs Pillow for the background renderer; headless mode does not. Both modes contain the same app and Applications shortcut.
The full test suite includes Russian interface-copy checks and native English/Russian keyboard mapping checks. These need the corresponding test language and enabled Apple input sources; they are not locale-independent unit tests. CI prepares these conditions on its disposable runner. Do not run its setup mode on your own account.
Builds live under `release/build`; output goes to `release/dist`. Both stay out of Git. Do not run the release builder and local installer simultaneously: they share the icon renderer. Scratch and output overrides must stay inside this checkout's `release/` or `.build/`, without symlinks.
The builder checks app and framework architectures, deployment targets, language resources, bundled dependencies, code signatures and the mounted image. Previous output is kept until the new images pass. A failed build leaves its log and staging directory for diagnosis; it detaches only its own mounted image.
@@ -45,6 +47,8 @@ The **macOS release draft** workflow runs manually or on a `v*` tag in this publ
The standard ARM64 `macos-26` runner uses Xcode 26.6, listed in [GitHub's runner image manifest](https://github.com/actions/runner-images/blob/0af81b6d930d02b52941d584bee9214c4bc228c6/images/macos/macos-26-arm64-Readme.md#xcode). The preflight checks the selected Xcode, Swift and macOS SDK before compiling. The runner runs the tests, builds the headless ad-hoc image and uploads exactly four files. A separate job verifies their checksums, version and source commit, then creates a **draft** release. It does not execute repository code with a write token. Existing releases and assets are never overwritten. A draft does not change the download button.
Before testing, the hosted-runner setup enables the built-in English and Russian input sources and sets iriz's own language preference to Russian. It does not select a different active keyboard, change the system language, grant permissions or replace the native keyboard map with a fixture. Setup refuses to write outside a GitHub-hosted macOS runner, and a failed prerequisite stops the build before the tests.
To verify the full build for a version that is already published, use **Run workflow → build_only: true**. This runs the tests, builds and verifies the DMG, and uploads the four files as an Actions artifact. The entire release-writing job is skipped: no draft, tag, asset or Latest change. With the default `false`, an existing release makes the draft job fail without changing it.
A maintainer reviews the draft, the release notes and a clean-machine install, runs the publication checks, then publishes it. Publishing is a separate action. No Apple credentials are required by this workflow and no background updater is installed in the app.
File diff suppressed because it is too large Load Diff
+3574 -3437
View File
File diff suppressed because it is too large Load Diff
+106
View File
@@ -0,0 +1,106 @@
// Integration fixtures for an ephemeral GitHub-hosted Mac, never the developer's Mac.
// Use --check locally: it only reads the enabled layouts and iriz's language key.
import Carbon
import Foundation
func require(_ condition: Bool, _ message: String) {
guard condition else {
FileHandle.standardError.write(Data((message + "\n").utf8))
exit(1)
}
}
let arguments = Array(CommandLine.arguments.dropFirst())
require(arguments == ["--check"] || arguments == ["--prepare-hosted"],
"Usage: macos_ci_environment.swift --check | --prepare-hosted")
let prepare = arguments == ["--prepare-hosted"]
if prepare {
let environment = ProcessInfo.processInfo.environment
require(environment["GITHUB_ACTIONS"] == "true"
&& environment["RUNNER_ENVIRONMENT"] == "github-hosted"
&& environment["RUNNER_OS"] == "macOS",
"Fixture writes require a GitHub-hosted macOS runner.")
}
func layouts(includeAllInstalled: Bool) -> [TISInputSource] {
// Same enabled-only filter as LayoutSwitcher.installedLayouts() when false.
let conditions = [
kTISPropertyInputSourceCategory as String: kTISCategoryKeyboardInputSource as Any,
kTISPropertyInputSourceIsSelectCapable as String: true as Any,
] as CFDictionary
guard let sources = TISCreateInputSourceList(conditions, includeAllInstalled)?
.takeRetainedValue() as? [TISInputSource] else {
require(false, "Cannot list macOS keyboard input sources.")
return []
}
return sources
}
func sourceID(_ source: TISInputSource) -> String {
guard let value = TISGetInputSourceProperty(source, kTISPropertyInputSourceID) else { return "" }
return Unmanaged<CFString>.fromOpaque(value).takeUnretainedValue() as String
}
func currentSourceID() -> String {
guard let source = TISCopyCurrentKeyboardInputSource()?.takeRetainedValue() else { return "" }
return sourceID(source)
}
func language(_ source: TISInputSource) -> String {
guard let value = TISGetInputSourceProperty(source, kTISPropertyInputSourceLanguages) else { return "" }
let languages = Unmanaged<CFArray>.fromOpaque(value).takeUnretainedValue() as? [String]
return String(languages?.first?.lowercased().prefix(2) ?? "")
}
func hasUnicodeData(_ source: TISInputSource) -> Bool {
guard let value = TISGetInputSourceProperty(source, kTISPropertyUnicodeKeyLayoutData) else { return false }
return CFDataGetLength(Unmanaged<CFData>.fromOpaque(value).takeUnretainedValue()) > 0
}
let englishIDs = ["com.apple.keylayout.US", "com.apple.keylayout.ABC"]
let russianID = "com.apple.keylayout.Russian"
let languageKey = "ru.smltlk.interfaceLanguage" as CFString
let originalSourceID = currentSourceID()
require(!originalSourceID.isEmpty, "Cannot identify the active keyboard input source.")
if prepare {
let enabled = layouts(includeAllInstalled: false)
let all = layouts(includeAllInstalled: true)
// Reuse an enabled Apple English layout; otherwise enable one, not both.
let english = (enabled + all).first { englishIDs.contains(sourceID($0)) }
let russian = all.first { sourceID($0) == russianID }
require(english != nil && russian != nil, "Apple US/ABC and Russian keyboard layouts must be installed.")
let pair = [english!, russian!]
require(pair.allSatisfy(hasUnicodeData), "Apple EN/RU layouts must expose nonempty Unicode layout data.")
for source in pair where !enabled.contains(where: { sourceID($0) == sourceID(source) }) {
let property = TISGetInputSourceProperty(source, kTISPropertyInputSourceIsEnableCapable)
require(property.map { Unmanaged<CFBoolean>.fromOpaque($0).takeUnretainedValue() == kCFBooleanTrue } == true,
"The Apple layout \(sourceID(source)) cannot be enabled.")
let status = TISEnableInputSource(source)
require(status == noErr, "Cannot enable \(sourceID(source)): OSStatus \(status).")
}
// kCFPreferencesAnyApplication is NSGlobalDomain. Only this iriz key changes;
// system language preferences and all unrelated global preferences stay intact.
CFPreferencesSetValue(languageKey, "ru" as CFString, kCFPreferencesAnyApplication,
kCFPreferencesCurrentUser, kCFPreferencesAnyHost)
require(CFPreferencesSynchronize(kCFPreferencesAnyApplication, kCFPreferencesCurrentUser,
kCFPreferencesAnyHost), "Cannot save iriz's CI language preference.")
}
let enabled = layouts(includeAllInstalled: false)
// Check the first EN/RU pair, exactly as DynamicKeyMapping.configureSharedKeyMapping does.
for (code, allowedIDs) in [("en", englishIDs), ("ru", [russianID])] {
guard let source = enabled.first(where: { language($0) == code }),
allowedIDs.contains(sourceID(source)), hasUnicodeData(source) else {
require(false, "Missing enabled Apple \(code) layout with Unicode data; the integration fixture is not ready.")
exit(1)
}
print("Enabled \(code) layout: \(sourceID(source)); Unicode data available.")
}
require(currentSourceID() == originalSourceID,
"The active keyboard input source changed during the environment check.")
let globalLanguage = CFPreferencesCopyValue(languageKey, kCFPreferencesAnyApplication,
kCFPreferencesCurrentUser, kCFPreferencesAnyHost) as? String
require(globalLanguage == "ru" && UserDefaults.standard.string(forKey: languageKey as String) == "ru",
"iriz's NSGlobalDomain language key must be ru and readable through UserDefaults.standard.")
print("PASS macOS integration environment: Apple EN/RU layouts, iriz language ru; active input unchanged.")
+64
View File
@@ -52,6 +52,9 @@ check(build['env']['DEVELOPER_DIR'] == '/Applications/Xcode_26.6.app/Contents/De
check(build['env']['IRIZ_NOTARY_PROFILE'] == '' && build['env']['IRIZ_DMG_HEADLESS'] == '1', 'No Apple credentials or Finder in CI')
check(build['steps'].any? { |step| step['run'] == 'swift test --no-parallel --jobs 2' }, 'Serial tests must precede packaging')
test_index = build['steps'].index { |step| step['run'] == 'swift test --no-parallel --jobs 2' }
environment_index = build['steps'].index { |step| step['name'] == 'Prepare hosted macOS integration environment' }
check(environment_index && environment_index == test_index - 1, 'Environment preparation must immediately precede tests')
check(!build['continue-on-error'] && build['steps'].none? { |step| step['continue-on-error'] }, 'Build failures must stop subsequent steps')
package_index = build['steps'].index { |step| step['run'] == 'bash scripts/make_release.sh' }
check(package_index && test_index < package_index, 'Packaging must follow successful tests')
check(build['steps'].none? { |step| step.key?('if') }, 'build_only must retain every build, test, verification and upload step')
@@ -71,6 +74,67 @@ workflow['jobs'].each_value do |job|
end
puts 'PASS workflow triggers, permissions, pins and Bash syntax'
environment_script = build['steps'][environment_index].fetch('run')
helper = File.read(File.join(__dir__, 'macos_ci_environment.swift'))
native_guard = <<'SWIFT'
if prepare {
let environment = ProcessInfo.processInfo.environment
require(environment["GITHUB_ACTIONS"] == "true"
&& environment["RUNNER_ENVIRONMENT"] == "github-hosted"
&& environment["RUNNER_OS"] == "macOS",
"Fixture writes require a GitHub-hosted macOS runner.")
}
SWIFT
check(helper.split('func layouts', 2).first.include?(native_guard), 'The native helper must guard all writes independently of Bash')
check(helper.include?('let prepare = arguments == ["--prepare-hosted"]'), 'Only the explicit prepare mode may write')
prepare_body = helper[/^if prepare \{\n let enabled = .*?^\}/m]
%w[TISEnableInputSource CFPreferencesSetValue CFPreferencesSynchronize].each do |call|
check(prepare_body && helper.scan(/\b#{call}\(/).size == 1 && prepare_body.include?("#{call}("), "#{call} must only run inside the guarded prepare mode")
end
check(!helper.match?(/TISSelectInputSource|AppleLanguages|AppleLocale|setPersistentDomain|CFPreferencesSetAppValue/), 'Never select a layout or replace system language preferences')
check(helper.include?('let englishIDs = ["com.apple.keylayout.US", "com.apple.keylayout.ABC"]') &&
helper.include?('let russianID = "com.apple.keylayout.Russian"'), 'Only the Apple EN/RU layout IDs are allowed')
check(helper.include?('let languageKey = "ru.smltlk.interfaceLanguage" as CFString') &&
helper.include?('CFPreferencesSetValue(languageKey, "ru" as CFString, kCFPreferencesAnyApplication,') &&
helper.include?('UserDefaults.standard.string(forKey: languageKey as String) == "ru"'), 'The iriz-only global preference needs an effective Foundation readback')
puts 'PASS native helper write boundary and exact fixture scope'
environment_commands = <<'BASH'
xcrun() {
case "$*" in
'swift scripts/macos_ci_environment.swift --prepare-hosted')
printf 'FIXTURE_PREPARE\n'; return "$MOCK_PREPARE_EXIT" ;;
'swift scripts/macos_ci_environment.swift --check')
printf 'FIXTURE_CHECK\n'; return "$MOCK_CHECK_EXIT" ;;
*) printf 'Unexpected xcrun arguments\n' >&2; return 99 ;;
esac
}
swift() {
[[ "$*" == 'test --no-parallel --jobs 2' ]] || return 99
printf 'FIXTURE_TESTS\n'
}
BASH
[
['hosted fixture then tests', {}, 0, %w[FIXTURE_PREPARE FIXTURE_CHECK FIXTURE_TESTS]],
['fixture preparation failure stops tests', { 'MOCK_PREPARE_EXIT' => '37' }, 37, %w[FIXTURE_PREPARE]],
['fixture readback failure stops tests', { 'MOCK_CHECK_EXIT' => '38' }, 38, %w[FIXTURE_PREPARE FIXTURE_CHECK]],
['local runner cannot prepare', { 'GITHUB_ACTIONS' => nil }, 1, []],
['false Actions flag cannot prepare', { 'GITHUB_ACTIONS' => 'false' }, 1, []],
['missing runner environment cannot prepare', { 'RUNNER_ENVIRONMENT' => nil }, 1, []],
['self-hosted runner cannot prepare', { 'RUNNER_ENVIRONMENT' => 'self-hosted' }, 1, []],
['missing runner OS cannot prepare', { 'RUNNER_OS' => nil }, 1, []],
['non-macOS runner cannot prepare', { 'RUNNER_OS' => 'Linux' }, 1, []]
].each do |name, overrides, expected_status, expected_calls|
env = { 'GITHUB_ACTIONS' => 'true', 'RUNNER_ENVIRONMENT' => 'github-hosted', 'RUNNER_OS' => 'macOS',
'MOCK_PREPARE_EXIT' => '0', 'MOCK_CHECK_EXIT' => '0' }.merge(overrides)
# Both commands are mocks; the real helper never prepares this machine.
script = environment_commands + environment_script + "\n" + build['steps'][test_index].fetch('run')
output, status = Open3.capture2e(env, 'bash', '-e', '-o', 'pipefail', '-c', script)
check(status.exitstatus == expected_status && output.lines.map(&:strip).grep(/^FIXTURE_/) == expected_calls, "#{name}: #{output}")
check(!expected_calls.empty? || output.include?('Fixture writes require a GitHub-hosted macOS runner.'), "#{name}: missing guard reason")
puts "PASS #{name}"
end
sha = 'a' * 40
version_script = build['steps'].find { |step| step['id'] == 'version' }.fetch('run')
toolchain = <<'BASH'