Meetily 0.4.1 配置参数详解

逐层拆解 Meetily 0.4.1 的全部配置载体与参数:构建期 tauri.conf.json/.env/环境变量、运行期 SQLite settings 与 transcript_settings 表、Whisper/Parakeet/内置摘要模型资产参数、摘要模板 JSON 与自定义覆盖规则、遗留后端配置归档说明,全部在 Ubuntu 22.04 源码构建环境实测

meetily会议纪要WhisperOllama自托管配置2026/10/23

Meetily 0.4.1 配置参数详解

目标:讲清 Meetily v0.4.1(Tauri 桌面应用)的所有配置放在哪、每一项是什么含义、默认值是什么、怎么改才生效。Meetily 的配置分散在「构建期配置文件 → 应用内设置(SQLite)→ 模型与模板资产」三层,本文按层逐项拆解,全部参数与文件内容均在 Ubuntu 22.04 (x86_64) 源码构建环境(源码目录 /root/work/meetily,v0.4.1 标签)实测查看;构建安装过程见《Ubuntu 22.04 安装 Meetily 0.4.1 指南》。

一、环境信息

  • 操作系统:Ubuntu 22.04 LTS(x86_64)
  • Meetily 版本:v0.4.1(源码标签 v0.4.1,提交 a2cb62e Release v0.4.1;2026-10-23 实查 GitHub Releases 最新稳定版)
  • 源码目录:/root/work/meetily(前一篇构建安装的同一台机器,下文所有文件查看命令均在该目录执行)
  • 配置查看工具:cat/sed/ls(文件内容)、sqlite3(可选,直查应用数据库)、node v20.20.2
  • 应用形态:Tauri 2 桌面应用(Rust 核心 + Next.js 14 界面),无独立服务进程、无系统级服务单元
  • 官方仓库:https://github.com/Zackriya-Solutions/meetily

二、前置条件

  1. 已按《Ubuntu 22.04 安装 Meetily 0.4.1 指南》完成源码构建,得到 deb 或 AppImage 产物;本文大量参数定义在源码中,保留源码目录便于对照与修改后重新构建。
  2. 应用首次启动会自动创建应用数据目录与 SQLite 数据库;运行期配置(模型选择、API Key 等)以应用设置页为官方修改入口,本文同时给出存储位置供排障与批量初始化。
  3. 修改构建期配置(tauri.conf.json 等)后需重新执行 ./build-gpu.sh 打包才能生效;运行期配置在设置页保存后即时生效。

三、配置体系总览与查看修改方式

3.1 三层配置载体

Meetily 没有单一的「主配置文件」,配置按生效时机分三层,先建立全局认知再逐项展开:

层载体生效时机典型内容
构建期源码 frontend/src-tauri/tauri.conf.json、frontend/.env、构建环境变量重新打包后应用标识、窗口、CSP 端点白名单、打包与更新器、签名密钥、GPU 加速特性
运行期应用数据目录内 SQLite 库的 settings、transcript_settings 表(设置页读写)保存即生效摘要模型提供方与端点、转写引擎、各家 API Key、录音设备偏好
资产层应用数据目录下模型文件、打包内置 templates/*.json、自定义模板目录放置/下载后生效Whisper/Parakeet/内置摘要模型文件、纪要模板

关键结论:换模型、改端点在应用设置页完成(运行期层);要让自定义 LLM 端点能被前端访问,必须同时核对构建期的 CSP 端点白名单(第四章 4.2),这是本篇最重要的隐性配置项。

3.2 应用数据目录与文件清单

应用数据目录由 tauri.conf.json 中的应用标识 identifier: com.meetily.ai 决定,Linux 上为 ~/.local/share/com.meetily.ai/(macOS 为 ~/Library/Application Support/com.meetily.ai/,Windows 为 %APPDATA%\com.meetily.ai\)。首次启动后该目录内会出现:

路径(相对应用数据目录)说明
meeting_minutes.sqlite主数据库:会议、转写分段、设置(settings/transcript_settings 表)
meeting_minutes.db旧版遗留库文件,启动时如存在会被迁移进 .sqlite 后保留
models/summary/内置摘要引擎(builtin-ai)的 GGUF 模型缓存目录
模型目录(Whisper/Parakeet)转写模型缓存,按所选引擎自动创建
录音与转写产物会议音频、分段文本等业务数据

数据库文件名与迁移逻辑来自源码 frontend/src-tauri/src/database/manager.rs(实查:主库 meeting_minutes.sqlite,遗留库 meeting_minutes.db,迁移时同目录处理 -wal/-shm 文件)。查看方式:

ls ~/.local/share/com.meetily.ai/

首次启动前该目录尚不存在,启动一次应用后即生成;未启动过的全新构建环境无需此步,运行期参数直接用设置页配置即可。

3.3 查看与修改方式

  • 推荐方式(运行期):应用内「Settings」页——转写引擎与模型、摘要提供方与端点、API Key、录音设备全部在此配置,保存即写入 settings/transcript_settings 表。
  • 排障方式(运行期):sqlite3 直查数据库(只读核对,不建议在应用运行时直改):
sqlite3 ~/.local/share/com.meetily.ai/meeting_minutes.sqlite "SELECT provider, model, whisperModel, ollamaEndpoint FROM settings;"
  • 构建期:直接编辑源码文件,重新 ./build-gpu.sh 打包(见第四章)。
  • 模板:自定义模板放入 ~/.local/share/Meetily/templates/ 覆盖同名内置模板(见第七章)。

四、构建期配置详解

4.1 tauri.conf.json 逐项详解

这是 Tauri 应用的主配置文件,位于 frontend/src-tauri/tauri.conf.json,决定应用标识、窗口、安全策略、打包目标与更新器。实测查看:

cat /root/work/meetily/frontend/src-tauri/tauri.conf.json

实测回显(全文,逐项解读见后表):

{
    "$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
    "productName": "meetily",
    "version": "0.4.1",
    "identifier": "com.meetily.ai",
    "build": {
        "frontendDist": "../out",
        "devUrl": "http://localhost:3118",
        "beforeDevCommand": "pnpm dev",
        "beforeBuildCommand": "pnpm build"
    },
    "app": {
        "windows": [
            {
                "title": "meetily",
                "width": 1100,
                "height": 700,
                "resizable": true,
                "fullscreen": false,
                "theme": "Light",
                "decorations": true
            }
        ],
        "macOSPrivateApi": true,
        "security": {
            "csp": {
                "default-src": "'self'",
                "style-src": "'self' 'unsafe-inline'",
                "img-src": "'self' asset: https://asset.localhost data:",
                "connect-src": "'self' http://localhost:11434 http://localhost:5167 http://localhost:8178 https://api.ollama.ai"
            },
            "assetProtocol": {
                "enable": true,
                "scope": [
                    "$APPDATA/**"
                ]
            },
            "capabilities": [
                {
                    "identifier": "main",
                    "description": "Main window capability with file system and media access",
                    "windows": [
                        "main"
                    ],
                    "permissions": [
                        "fs:default",
                        "fs:allow-read-file",
                        "fs:read-all",
                        "fs:write-all",
                        "fs:allow-app-read",
                        "fs:allow-app-write",
                        "fs:allow-download-write",
                        "fs:allow-download-read",
                        "fs:scope-download",
                        "core:path:default",
                        "core:event:default",
                        "core:window:default",
                        "core:app:default",
                        "core:resources:default",
                        "core:menu:default",
                        "core:tray:default",
                        "core:window:allow-set-title",
                        "store:default",
                        "notification:default",
                        "notification:allow-is-permission-granted",
                        "updater:default",
                        "process:default",
                        {
                            "identifier": "fs:scope",
                            "allow": [
                                {
                                    "path": "$APPDATA/*"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    },
    "bundle": {
        "active": true,
        "targets": [
            "deb",
            "appimage",
            "msi",
            "nsis",
            "app",
            "dmg"
        ],
        "createUpdaterArtifacts": true,
        "icon": [
            "icons/icon.png",
            "icons/app_icon.icns",
            "icons/app_icon.ico"
        ],
        "resources": [
            "templates/*.json"
        ],
        "externalBin": [
            "binaries/llama-helper",
            "binaries/ffmpeg"
        ],
        "macOS": {
            "entitlements": "entitlements.plist",
            "signingIdentity": "-",
            "hardenedRuntime": true
        },
        "windows": {
            "signCommand": "powershell -ExecutionPolicy Bypass -File scripts/sign-windows.ps1 -FilePath %1"
        }
    },
    "plugins": {
        "updater": {
            "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEVDQTYzMUQ3ODc5N0M4MkEKUldRcXlKZUgxekdtN09DRkVWSHNpZlJseEVOUmpNd1dDSTNaLzZ3MXJGTnY3WW1pdnlOYjBpbkIK",
            "endpoints": [
                "https://github.com/Zackriya-Solutions/meeting-minutes/releases/latest/download/latest.json"
            ]
        }
    }
}

核心项解读(改哪项、影响什么):

配置项当前值含义与改动影响
productNamemeetily应用显示名;同时决定 deb 包名(meetily_0.4.1_amd64.deb)与窗口标题
version0.4.1应用版本号,随发布标签变化;自改后产物文件名随之变化
identifiercom.meetily.ai应用唯一标识;决定应用数据目录路径(Linux ~/.local/share/com.meetily.ai/),改了会导致旧数据「消失」(实为新目录)
build.frontendDist../outNext.js 静态导出目录,pnpm build 的产物位置,一般不动
build.devUrlhttp://localhost:3118开发模式前端地址(pnpm dev 监听 3118 端口),仅开发时使用
app.windows1100×700、Light 主题主窗口尺寸/标题/主题,可按需调整默认尺寸
app.security.csp见 4.2内容安全策略,connect-src 是 LLM 端点白名单,见 4.2
bundle.targetsdeb/appimage/msi/nsis/app/dmg各平台打包目标;Linux 实际产出 deb 与 AppImage 两类
bundle.resourcestemplates/*.json内置纪要模板随包打包(对应 src-tauri/templates/,见第七章)
bundle.externalBinbinaries/llama-helper、binaries/ffmpeg两个 sidecar 外部二进制;缺失时打包直接失败(排障实录见安装指南第九章 FAQ)
bundle.createUpdaterArtifactstrue为应用内自更新生成签名增量包;无私钥时构建收尾报 TAURI_SIGNING_PRIVATE_KEY 错误(主产物不受影响,见安装指南 4.8)
plugins.updater.pubkey内置公钥(minisign)更新包签名校验公钥;自建分发替换私钥体系时需同步替换
plugins.updater.endpointsGitHub Releases latest.json更新清单地址;内网环境无法访问 GitHub 时应用内更新不可用,可指向自托管清单

4.2 CSP connect-src:LLM 端点白名单(最易踩坑项)

app.security.csp.connect-src 限制了前端WebView 能发起网络请求的目标:

'self' http://localhost:11434 http://localhost:5167 http://localhost:8178 https://api.ollama.ai

当前白名单逐项含义:

端点用途
'self'应用自身页面与静态资源
http://localhost:11434本机 Ollama 服务默认端口(摘要模型提供方 ollama 的默认端点)
http://localhost:5167遗留 Python FastAPI 后端默认端口(见第八章,历史兼容保留)
http://localhost:8178遗留独立 Whisper 转写服务默认端口(历史兼容保留)
https://api.ollama.aiOllama 官方服务地址

实测查看:上述值同时出现在 tauri.conf.json 与 Rust 侧的默认端点配置文件 frontend/src-tauri/config/backend_config.json 中:

cat /root/work/meetily/frontend/src-tauri/config/backend_config.json

实测回显:

{
  "whisperEndpoint": "http://127.0.0.1:8178/stream",
  "ollamaEndpoint": "http://localhost:11434",
  "fastApiEndpoint": "http://localhost:5167"
}

三个键即为三类后端端点的出厂默认值:ollamaEndpoint(摘要,当前主线)、whisperEndpoint/fastApiEndpoint(遗留后端,第八章)。

⚠️ 关键影响:设置页里「Custom OpenAI」或自定义 Ollama 端点如果指向白名单之外的主机/端口(例如 http://192.168.1.10:8000 上自建的 vLLM),保存后连接测试或实际调用会被 CSP 拦截。解决方法:把目标端点加入 connect-src 白名单(形如 http://192.168.1.10:8000,多个端点空格分隔),重新 ./build-gpu.sh 打包。仅改设置页不改白名单是「配了连不上」的最常见原因(见第十章 Q1)。

4.3 .env:Tauri 代码签名配置

frontend/.env 用于 CI 打包签名(模板 .env.example 实测内容):

cat /root/work/meetily/frontend/.env.example

实测回显:

# Tauri Code Signing Configuration

TAURI_SIGNING_PRIVATE_KEY=

TAURI_SIGNING_PRIVATE_KEY_PASSWORD=

# Notes:
# - The key should be a single line of base64-encoded text
# - The password is used by Tauri during build
# - For CI/CD, set these as repository secrets instead of using .env
变量说明
TAURI_SIGNING_PRIVATE_KEY更新器签名私钥(单行 base64,或文件路径);不设则仅缺失更新器增量包,主产物正常产出
TAURI_SIGNING_PRIVATE_KEY_PASSWORD私钥口令;生成密钥时设置的密码

密钥对生成:pnpm tauri signer generate -w ~/.tauri/meetily.key(交互设置口令)。自建分发时把对应公钥替换进 tauri.conf.json 的 plugins.updater.pubkey。

4.4 构建环境变量(GPU 加速特性)

构建期的另一组「配置」是传给 build-gpu.sh 的环境变量,决定转写引擎的加速后端:

变量取值示例作用
TAURI_GPU_FEATUREcuda / hipblas / vulkan / openblas / 空串强制指定加速特性,绕过自动探测;空串=强制纯 CPU
CMAKE_CUDA_ARCHITECTURES86(RTX 30 系)/ 89(RTX 40 系)CUDA 目标架构,按 GPU 算力设置
VULKAN_SDK/usrVulkan SDK 路径,Vulkan 特性探测条件之一
BLAS_INCLUDE_DIRS/usr/include/x86_64-linux-gnuOpenBLAS 头文件目录,OpenBLAS/Vulkan 路线均需
CMAKE_CUDA_STANDARD / CMAKE_POSITION_INDEPENDENT_CODE17 / ONCUDA 路线辅助变量
CARGO_BUILD_JOBS2降低 Rust 编译并行度,防 OOM

GPU 自动探测优先级、各路线完整命令与回显见《Ubuntu 22.04 安装 Meetily 0.4.1 指南》第五章,不在此重复。验证探测结果可直接运行官方探测脚本:

cd /root/work/meetily/frontend && node scripts/auto-detect-gpu.js

实测回显(无 GPU/无 SDK 的环境):

💻 No GPU acceleration available - using CPU-only mode

五、应用内运行期配置详解

5.1 摘要模型配置(settings 表)

摘要生成用哪个大模型、走什么端点,是 Meetily 最核心的运行期配置。存储于主数据库 settings 表(单行记录,id='1',保存即覆盖更新),字段定义实查自 frontend/src-tauri/src/database/models.rs:

sed -n '70,108p' /root/work/meetily/frontend/src-tauri/src/database/models.rs

实测回显:

pub struct Setting {
    pub id: String,
    pub provider: String,
    pub model: String,
    #[sqlx(rename = "whisperModel")]
    #[serde(rename = "whisperModel")]
    pub whisper_model: String,
    #[sqlx(rename = "groqApiKey")]
    #[serde(rename = "groqApiKey")]
    pub groq_api_key: Option<String>,
    #[sqlx(rename = "openaiApiKey")]
    #[serde(rename = "openaiApiKey")]
    pub openai_api_key: Option<String>,
    #[sqlx(rename = "anthropicApiKey")]
    #[serde(rename = "anthropicApiKey")]
    pub anthropic_api_key: Option<String>,
    #[sqlx(rename = "ollamaApiKey")]
    #[serde(rename = "ollamaApiKey")]
    pub ollama_api_key: Option<String>,
    #[sqlx(rename = "openRouterApiKey")]
    #[serde(rename = "openRouterApiKey")]
    pub open_router_api_key: Option<String>,
    #[sqlx(rename = "ollamaEndpoint")]
    #[serde(rename = "ollamaEndpoint")]
    pub ollama_endpoint: Option<String>,
    /// Custom OpenAI-compatible endpoint configuration stored as JSON
    #[sqlx(rename = "customOpenAIConfig")]
    #[serde(rename = "customOpenAIConfig")]
    pub custom_openai_config: Option<String>,
}

逐字段说明与取值:

字段类型说明
idString固定 '1',单行配置(源码 save_model_config 用 ON CONFLICT(id) DO UPDATE 实现覆盖式保存)
providerString摘要提供方,允许值:ollama / groq / claude / openrouter / openai / builtin-ai / custom-openai(源码 frontend/src/services/configService.ts 的 ModelConfig 类型定义实测一致)
modelString该提供方下的模型名,如 llama3.1:8b(Ollama)、qwen3.5:2b(builtin-ai)、llama-3.3-70b-versatile(Groq)等
whisperModelString摘要配置内冗余记录的转写模型名(与 transcript_settings 联动保存)
groqApiKey / openaiApiKey / anthropicApiKey / ollamaApiKey / openRouterApiKey可空各提供方 API Key,按所选 provider 使用对应字段;Key 保存在本机数据库,不上传
ollamaEndpoint可空Ollama 服务地址,默认 http://localhost:11434(backend_config.json 出厂值),可指向内网其他 Ollama 实例
customOpenAIConfig可空自定义 OpenAI 兼容端点的 JSON 配置,见 5.3

💡 技术拓展:provider 的取值本质是三种推理形态——本地进程内推理(builtin-ai,应用自带 llama.cpp 封装的 sidecar 直接加载本机 GGUF 模型)、本地服务推理(ollama,调用本机或内网 Ollama 的 REST 接口,模型管理交给 Ollama)、云 API 推理(groq/claude/openrouter/openai/custom-openai,按 Token 计费,数据出本机)。隐私优先选 builtin-ai 或 Ollama;低配机器选云 API;企业内网网关用 custom-openai。本方案默认推荐 builtin-ai(零外部依赖)或 ollama(模型选择面广)。

5.2 转写引擎配置(transcript_settings 表)

转写(录音→文字)的引擎与 Key 存于 transcript_settings 表,源码结构(database/models.rs 实查):

pub struct TranscriptSetting {
    pub id: String,
    pub provider: String,
    pub model: String,
    #[sqlx(rename = "whisperApiKey")]
    pub whisper_api_key: Option<String>,
    #[sqlx(rename = "deepgramApiKey")]
    pub deepgram_api_key: Option<String>,
    #[sqlx(rename = "elevenLabsApiKey")]
    pub eleven_labs_api_key: Option<String>,
    #[sqlx(rename = "groqApiKey")]
    pub groq_api_key: Option<String>,
    #[sqlx(rename = "openaiApiKey")]
    pub openai_api_key: Option<String>,
    // …(后略:完整结构以源码为准,字段风格与上同)
}
字段说明
provider转写提供方,允许值:localWhisper / deepgram / elevenLabs / groq / openai(源码注释原文:「Transcript providers: localWhisper, deepgram, elevenLabs, groq, openai」);默认 localWhisper(本地 whisper.cpp,隐私优先主线)
model转写模型名,localWhisper 下取第六章目录中的模型名(默认 large-v3-turbo)
*ApiKey云转写服务密钥;localWhisper 无需 Key

⚠️ 注意:除 localWhisper 外的转写提供方都会把音频送往第三方(Deepgram/ElevenLabs/Groq/OpenAI),与 Meetily「数据不出本机」的默认主张相悖,仅在有合规前提下使用。

5.3 Custom OpenAI 兼容端点(custom-openai)

custom-openai 提供方用于对接任意 OpenAI 兼容 API(vLLM、LiteLLM、OneAPI、企业网关等),配置为 JSON 存在 settings.customOpenAIConfig 字段,结构实查自 configService.ts:

export interface CustomOpenAIConfig {
  endpoint: string;
  apiKey: string | null;
  model: string;
  maxTokens: number | null;
  temperature: number | null;
  topP: number | null;
}

逐项说明:

字段说明示例
endpoint兼容 API 基地址(含 /v1 与否以服务端为准,应用会按 OpenAI 约定拼接 /chat/completions)http://192.168.1.10:8000/v1
apiKeyBearer 令牌;内网无鉴权服务可留空(null)sk-gateway-demo
model模型名(服务端 /v1/models 列表中的名称)Qwen2.5-7B-Instruct
maxTokens单次生成上限;null 用服务端默认2048
temperature / topP采样温度与核采样阈值;null 用应用内置预设0.5 / 0.8

设置页保存前会先调用连接测试(Tauri 命令 api_test_custom_openai_connection,参数为 endpoint/apiKey/model,返回 status、message 与 http_status)——测试通过再保存。前置动作:把 endpoint 加入 CSP 白名单(4.2),否则测试请求被浏览器策略拦截,表现为无论怎么填都「连接失败」。

5.4 录音设备偏好

麦克风与系统回放设备的选择持久化在 get_recording_preferences/保存命令对应的存储中,结构(configService.ts 实查):

export interface RecordingPreferences {
  preferred_mic_device: string | null;
  preferred_system_device: string | null;
}

两个键分别记忆上一次选定的麦克风与系统输出设备名,null 表示未指定(每次录制前手动选择)。在设置页或录制面板的设备下拉中切换即自动保存;设备名与系统一致(可用 pactl list sources short 查看可选设备名),设备拔插后名称变化会导致偏好失效,重新选择一次即可。

5.5 内置摘要引擎(llama-helper)推理参数

选 builtin-ai 提供方时,实际推理由 sidecar 二进制 llama-helper(llama.cpp 封装)执行,前端通过 stdin/stdout 交换 JSON 控制推理参数。请求协议定义实查自 llama-helper/src/main.rs:

enum Request {
    Generate {
        prompt: String,
        max_tokens: Option<i32>,
        context_size: Option<u32>,
        model_path: Option<String>,
        // Sampling parameters
        temperature: Option<f32>,
        top_k: Option<i32>,
        top_p: Option<f32>,
        presence_penalty: Option<f32>,
        frequency_penalty: Option<f32>,
        repeat_penalty: Option<f32>,
        penalty_last_n: Option<i32>,
        stop_tokens: Option<Vec<String>>,
    },
    Ping,
    Shutdown,
}

参数逐项说明(这些值也是内置模型预设的内容,见 6.3):

参数类型含义预设参考值(Qwen3.5 摘要预设)
promptString已按模板拼装的完整提示词(由应用组装)—
max_tokensi32生成 token 上限按模板输出长度设定
context_sizeu32上下文窗口(token),内置模型统一 3276832768
model_pathStringGGUF 模型文件绝对路径(models/summary/ 下,见 6.3)—
temperaturef32采样温度,越低越确定0.5
top_ki32每步只在概率前 k 个 token 中采样20
top_pf32核采样阈值0.8
presence_penaltyf32出现惩罚,抑制重复话题0.3
frequency_penaltyf32频率惩罚0.0
repeat_penaltyf32重复惩罚(llama.cpp 特有)1.05
penalty_last_ni32惩罚生效的最近 token 数256
stop_tokensVec<String>停止序列(与模型对话模板匹配)`["<

sidecar 还有一个固定行为:空闲 300 秒自动退出(进程启动横幅可见),由应用按需再次拉起。可用最小报文实测协议(ping 必须小写,协议变体名为 generate/ping/shutdown):

echo '{"type":"ping"}' | /root/work/meetily/target/release/llama-helper

实测回显:

🦙 llama-helper starting (idle timeout: 300s)
{"type":"pong"}
📪 EOF received, shutting down

若发送协议外的变体名,会得到带原因的错误回包(实测大小写敏感):

❌ Failed to parse request: unknown variant `Ping`, expected one of `generate`, `ping`, `shutdown` at line 1 column 14
{"type":"error","message":"Invalid request: unknown variant `Ping`, expected one of `generate`, `ping`, `shutdown` at line 1 column 14"}

⚠️ 注意:llama-helper 是应用内部 sidecar,正常使用无需手工调用;上例用于验证二进制可用性与理解参数语义。参数与应用内的对应关系:设置页部分提供方(如 custom-openai)暴露的 temperature/topP/maxTokens 即上表同名参数。

六、模型资产参数详解

6.1 Whisper 转写模型:内置目录、默认值与下载源

Whisper 引擎支持的模型与元数据硬编码在 frontend/src-tauri/src/config.rs 的 WHISPER_MODEL_CATALOG 中(实测查看:文件头 36 行完整包含默认值与目录清单):

sed -n '1,36p' /root/work/meetily/frontend/src-tauri/src/config.rs

实测回显:

/// Application configuration constants
///
/// Centralized definitions for default models and settings.
/// Used across database initialization, import, and retranscription.

/// Default Whisper model for transcription when no preference is configured.
/// This is the recommended balance of accuracy and speed.
pub const DEFAULT_WHISPER_MODEL: &str = "large-v3-turbo";

/// Default Parakeet model for transcription when no preference is configured.
/// This is the quantized version optimized for speed.
pub const DEFAULT_PARAKEET_MODEL: &str = "parakeet-tdt-0.6b-v3-int8";

/// Whisper model catalog with metadata for all supported models.
/// Used by both WhisperEngine::discover_models() and discover_models_standalone().
///
/// Format: (name, filename, size_mb, accuracy, speed, description)
pub const WHISPER_MODEL_CATALOG: &[(&str, &str, u32, &str, &str, &str)] = &[
    // Standard f16 models (full precision)
    ("tiny", "ggml-tiny.bin", 74, "Decent", "Very Fast", "Fastest processing, good for real-time use"),
    ("base", "ggml-base.bin", 142, "Good", "Fast", "Good balance of speed and accuracy"),
    ("small", "ggml-small.bin", 466, "Good", "Medium", "Better accuracy, moderate speed"),
    ("medium", "ggml-medium.bin", 1463, "High", "Slow", "High accuracy for professional use"),
    ("large-v3-turbo", "ggml-large-v3-turbo.bin", 1549, "High", "Medium", "Best accuracy with improved speed"),
    ("large-v3", "ggml-large-v3.bin", 2951, "High", "Slow", "Most Accurate, latest large model"),

    // Q5_1 quantized models (balanced speed/accuracy, slightly better quality than Q5_0)
    ("tiny-q5_1", "ggml-tiny-q5_1.bin", 31, "Decent", "Very Fast", "Quantized tiny model, ~50% faster processing"),
    ("base-q5_1", "ggml-base-q5_1.bin", 57, "Good", "Fast", "Quantized base model, good speed/accuracy balance"),
    ("small-q5_1", "ggml-small-q5_1.bin", 181, "Good", "Fast", "Quantized small model, faster than f16 version"),

    // Q5_0 quantized models (balanced speed/accuracy)
    ("medium-q5_0", "ggml-medium-q5_0.bin", 514, "High", "Medium", "Quantized medium model, professional quality"),
    ("large-v3-turbo-q5_0", "ggml-large-v3-turbo-q5_0.bin", 547, "High", "Medium", "Quantized large model, best balance"),
    ("large-v3-q5_0", "ggml-large-v3-q5_0.bin", 1031, "High", "Slow", "Quantized large model, high accuracy"),
];

整理成选型表(12 个模型,默认 large-v3-turbo):

模型名文件名大小精度速度适用
tinyggml-tiny.bin74 MBDecentVery Fast实时性优先
baseggml-base.bin142 MBGoodFast速度/精度均衡入门
smallggml-small.bin466 MBGoodMedium更准,速度中等
mediumggml-medium.bin1463 MBHighSlow专业用途
large-v3-turbo(默认)ggml-large-v3-turbo.bin1549 MBHighMedium精度与速度最佳平衡
large-v3ggml-large-v3.bin2951 MBHighSlow最高精度
tiny-q5_1ggml-tiny-q5_1.bin31 MBDecentVery Fast量化 tiny,快约 50%
base-q5_1ggml-base-q5_1.bin57 MBGoodFast量化 base
small-q5_1ggml-small-q5_1.bin181 MBGoodFast量化 small
medium-q5_0ggml-medium-q5_0.bin514 MBHighMedium量化 medium
large-v3-turbo-q5_0ggml-large-v3-turbo-q5_0.bin547 MBHighMedium量化默认模型,容量减半
large-v3-q5_0ggml-large-v3-q5_0.bin1031 MBHighSlow量化 large

应用内点击下载时使用的源地址硬编码在 whisper_engine.rs 的 download_model()(实查回显,12 条与目录一一对应):

"tiny" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-tiny.bin",
"base" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.bin",
"small" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin",
"medium" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-medium.bin",
"large-v3-turbo" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo.bin",
"large-v3" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3.bin",
"tiny-q5_1" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-tiny-q5_1.bin",
"base-q5_1" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base-q5_1.bin",
"small-q5_1" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small-q5_1.bin",
"medium-q5_0" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-medium-q5_0.bin",
"large-v3-turbo-q5_0" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo-q5_0.bin",
"large-v3-q5_0" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-q5_0.bin",

即统一来自 Hugging Face 仓库 ggerganov/whisper.cpp(whisper.cpp 官方转换的 ggml 格式)。离线放置:手动从上述 URL 下载对应 .bin 文件放入应用数据目录的模型目录(文件名必须与 6.1 表中 文件名 完全一致),重启应用后模型管理页即可识别(引擎启动时按目录扫描发现模型)。

💡 技术拓展:ggml 模型的量化格式决定了体积与精度的取舍——f16 全精度(原始)、Q5_1(4.5bit 均匀量化+极小损失)、Q5_0(4.5bit,略逊 Q5_1)。同一模型 Q5_0/Q5_1 版本体积约为 f16 的 35%,精度损失对转写场景几乎无感,磁盘紧张时优先选 Q5 系(如 large-v3-turbo-q5_0 547 MB 对比 f16 的 1549 MB)。本文方案采用官方默认 large-v3-turbo,理由是官方标注的精度/速度最佳平衡点。

6.2 Parakeet 转写模型:变体与来源

Parakeet 是 NVIDIA 的低延迟英文向转写模型,Meetily 通过 ONNX 运行时(ort-sys)加载。默认模型 parakeet-tdt-0.6b-v3-int8(config.rs 的 DEFAULT_PARAKEET_MODEL,见 6.1 实测回显)。三个可选变体(元数据实查自 frontend/src/lib/parakeet.ts):

模型名定位大小量化速度标注
parakeet-tdt-0.6b-v3-int8(默认)实时转写,速度优先670 MB(652 MB encoder + 18.2 MB decoder + 0.2 MB extras)Int8Ultra Fast
parakeet-tdt-0.6b-v2-int8上一代,体积更小661 MB(652 + 9 + 0.15 MB)Int8Very Fast(25x 实时)
parakeet-tdt-0.6b-v3-fp32精度优先2554 MB(2.44 GB + 41.8 + 72.5 + 0.2 MB)FP32Fast(20x 实时,更高精度)

模型源(Rust 端 parakeet_engine.rs 实查):基址 https://huggingface.co/istupakov/parakeet-tdt-0.6b-v2-onnx/resolve/0bbb45a3365852604aef28b538a8f066f4ccaa85(源码以 commit 固定版本保证可复现),v3 变体来自 istupakov/parakeet-tdt-0.6b-v3-onnx(前端源码注释标注)。Parakeet 加速依赖 onnxruntime 预编译包(构建期由 ort-sys 自动下载,排障见安装指南 4.8 排障实录四)。

6.3 内置摘要模型(builtin-ai):目录与预设

builtin-ai 提供方的可用 GGUF 模型定义在 frontend/src-tauri/src/summary/summary_engine/models.rs 的 get_available_models()(实查 164–218 行),4 个模型:

模型名显示名GGUF 文件对话模板下载 URL大小上下文层数采样预设
qwen3.5:2bQwen 3.5 2B (Balanced)Qwen3.5-2B-Q4_K_M.ggufqwen3.5_nonthinkinghttps://huggingface.co/unsloth/Qwen3.5-2B-GGUF/resolve/main/Qwen3.5-2B-Q4_K_M.gguf1221 MB3276824qwen35_summary
qwen3.5:4bQwen 3.5 4B (High Quality)Qwen3.5-4B-Q4_K_M.ggufqwen3.5_nonthinkinghttps://huggingface.co/unsloth/Qwen3.5-4B-GGUF/resolve/main/Qwen3.5-4B-Q4_K_M.gguf2614 MB3276832qwen35_summary
gemma3:4bGemma 3 4B (Balanced)gemma-3-4b-it-Q4_K_M.ggufgemma3https://huggingface.co/bartowski/google_gemma-3-4b-it-GGUF/resolve/main/google_gemma-3-4b-it-Q4_K_M.gguf2374 MB3276835gemma3_instruct
gemma3:1bGemma 3 1B (Fast)gemma-3-1b-it-Q8_0.ggufgemma3https://huggingface.co/bartowski/google_gemma-3-1b-it-GGUF/resolve/main/google_gemma-3-1b-it-Q8_0.gguf1019 MB3276826gemma3_instruct

要点:默认模型为列表首个 qwen3.5:2b(源码 get_default_model() 取首项);layer_count 用于 GPU offload 层数计算(CPU 模式不用);下载缓存目录为应用数据目录下 models/summary/(源码 get_models_directory():app_data_dir.join("models").join("summary"))。

两个采样预设的实际取值(同文件 SamplingParams 实现实查):

预设temperaturetop_ktop_ppresence_penaltyfrequency_penaltyrepeat_penaltypenalty_last_nstop_tokens
qwen35_summary0.5200.80.30.01.05256<|im_end|>
gemma3_instruct1.0640.950.00.01.00<end_of_turn>

七、摘要模板配置详解

7.1 内置模板清单

纪要的输出结构由「模板」驱动:每个模板定义若干小节(Summary/Action Items 等)与给 LLM 的抽取指令。内置模板随应用打包(tauri.conf.json 的 bundle.resources: ["templates/*.json"]),源文件位于 frontend/src-tauri/templates/。实测查看:

ls /root/work/meetily/frontend/src-tauri/templates/

实测回显:

README.md
daily_standup.json
project_sync.json
psychatric_session.json
retrospective.json
sales_marketing_client_call.json
standard_meeting.json

6 个内置模板:daily_standup(每日站会)、standard_meeting(通用会议,默认主线)、project_sync(项目同步)、retrospective(复盘)、sales_marketing_client_call(销售/市场客户通话)、psychatric_session(心理咨询会谈,源码原始命名如此)。

7.2 模板 JSON schema 与实测示例

模板 schema(templates/README.md 实查):

字段层级必填说明
name根是模板显示名
description根是模板用途说明
sections根是小节数组
sections[].title小节是小节标题(纪要中的章节名)
sections[].instruction小节是给 LLM 的抽取/撰写指令
sections[].format小节是paragraph(段落)/ list(列表)/ string(字符串)
sections[].item_format小节否列表项 Markdown 格式提示(如表格列结构)
sections[].example_item_format小节否备选格式提示

实测查看 daily_standup.json 全文:

cat /root/work/meetily/frontend/src-tauri/templates/daily_standup.json

实测回显:

{
  "name": "Daily Standup",
  "description": "Time-boxed daily updates for engineering/product teams.",
  "sections": [
    {
      "title": "Date",
      "instruction": "YYYY-MM-DD",
      "format": "string"
    },
    {
      "title": "Attendees",
      "instruction": "List of participants present",
      "format": "list"
    },
    {
      "title": "Yesterday",
      "instruction": "What I completed yesterday (short bullets)",
      "format": "list",
      "example_item_format": "| **Owner** | **Completed Work** |\n| --- | --- |"
    },
    {
      "title": "Today",
      "instruction": "Planned work for today (short bullets)",
      "format": "list",
      "example_item_format": "| **Owner** | **Planned Work** |\n| --- | --- |"
    },
    {
      "title": "Blockers",
      "instruction": "Any impediments and owner if known",
      "format": "list",
      "item_format": "| **Owner** | **Blocker** | Impact |\n| --- | --- | --- |"
    },
    {
      "title": "Notes",
      "instruction": "Optional quick notes or announcements",
      "format": "paragraph"
    }
  ]
}

解读:instruction 是提示词组装的核心——模板加载器会把每个小节的 instruction 连同转写文本一起喂给摘要模型(源码 templates/loader.rs 的 get_template() 加载、list_template_ids() 罗列);item_format 直接给了 Markdown 表头,模型按此输出表格化列表。改模板就是在改提示词工程:想让纪要多一个「风险」小节,加一个 {"title": "Risks", "instruction": "List risks raised in the discussion and their mitigation", "format": "list"} 即可。

7.3 自定义模板目录与覆盖规则

模板解析优先级(loader.rs 实查):用户自定义目录 → 应用内置打包资源 → 内嵌兜底模板;同名文件(不含 .json 后缀的模板 id)自定义版本覆盖内置版本。自定义目录各平台路径(loader.rs 注释与 dirs::data_dir() 实现一致):

平台自定义模板目录
Linux~/.local/share/Meetily/templates/
macOS~/Library/Application Support/Meetily/templates/
Windows%APPDATA%\Meetily\templates\

Linux 下实测操作:

mkdir -p ~/.local/share/Meetily/templates
cp /root/work/meetily/frontend/src-tauri/templates/standard_meeting.json \
  ~/.local/share/Meetily/templates/standard_meeting.json

编辑副本(如把 Action Items 小节指令改为要求中文输出),重启应用后在纪要页选择模板即生效。⚠️ 注意该目录在「Meetily」目录下,与 3.2 的应用数据目录(com.meetily.ai)是两个不同目录——前者是通用应用数据目录(dirs::data_dir()),后者是 Tauri 标识目录,不要放混。

八、遗留 Python 后端配置(归档状态,勿用于新装)

仓库 backend/ 目录还保留一套 Python/FastAPI 时代的配置脚本,v0.4.1 官方已将其归档为「仅历史参考」(backend/SCRIPTS_DOCUMENTATION.md 原文:「The legacy scripts in this directory are retained only for historical reference…Do not use them for new installs, production deployments, or contributor setup」)。其配置文件 backend/temp.env 实测内容:

cat /root/work/meetily/backend/temp.env

实测回显:

ANTHROPIC_API_KEY=api_key_here
GROQ_API_KEY=gapi_key_here
OPENAI_API_KEY=api_key_here

配套的 set_env.sh 会把 temp.env 复制为 .env 并交互式引导替换三个 API Key(ANTHROPIC/GROQ/OPENAI)。这套环境变量只对遗留 FastAPI 后端(默认端口 5167)与独立 whisper 服务(默认端口 8178)生效——新版 Tauri 应用的 API Key 走第五章的数据库配置,与这套 .env 无关。4.2 白名单中保留 5167/8178 端口正是为兼容旧形态;新装环境不要启动遗留后端(其无鉴权与 CORS 行为已被官方标记为不支持)。

九、生产配置模板

以下三套配置按硬件与数据边界给出,均以「设置页操作 + 涉及参数」描述,可独立执行。

9.1 全本机隐私版(推荐:8 GB 内存、无 GPU、数据绝不出机)

配置项取值
转写 providerlocalWhisper(默认)
转写模型large-v3-turbo(1549 MB,磁盘紧张换 large-v3-turbo-q5_0 547 MB)
摘要 providerbuiltin-ai
摘要模型qwen3.5:2b(1221 MB GGUF,首次选用时应用内下载)
摘要模板standard_meeting(或按会议类型切换 7.1 清单)
外部依赖无(断网可用,模型下载除外)

内存占用参考:large-v3-turbo 转写 + 2B 摘要模型并发约需 4–6 GB;8 GB 以下机器把转写模型降为 small-q5_1(181 MB)。

9.2 本地 Ollama 服务版(16 GB 内存、想要更强摘要模型)

配置项取值
前置本机安装并启动 Ollama(ollama serve,监听 http://localhost:11434)
转写 providerlocalWhisper,模型 large-v3-turbo
摘要 providerollama
ollamaEndpointhttp://localhost:11434(默认,免改)
摘要模型Ollama 内已拉取的模型名,如 qwen3.5:4b / llama3.1:8b

要点:模型选择面由 Ollama 决定(ollama pull 什么就能用什么);应用只填模型名字符串,名字必须与 ollama list 一致。CSP 白名单已含 11434 端口,无需改构建配置。

9.3 内网 OpenAI 兼容网关版(企业内网自建推理服务)

配置项取值
前置内网已部署 OpenAI 兼容服务(vLLM/LiteLLM 等,示例 http://192.168.1.10:8000/v1)
第一步(必做)编辑 tauri.conf.json,connect-src 追加 http://192.168.1.10:8000,重新构建打包(见 4.2)
摘要 providercustom-openai
endpointhttp://192.168.1.10:8000/v1
apiKey网关令牌(无鉴权留空)
model网关侧模型名(如 Qwen2.5-7B-Instruct)
maxTokens / temperature / topP2048 / 0.5 / 0.8

该形态数据仍不出内网,适合已有统一模型网关的团队;转写保持 localWhisper 本地引擎。

十、常见问题(FAQ)

Q1:设置页填了自定义端点,连接测试一直失败? 按序排查:① 端点是否已加入 CSP connect-src 白名单(4.2)——未加白时请求在 WebView 层被拦,表现与「服务不通」一模一样,这是最常见原因;② 改完白名单是否重新打包——CSP 属构建期配置,只改源码不重打不生效;③ 服务本身是否可达——在终端 curl http://<端点>/v1/models 验证(示例:curl http://192.168.1.10:8000/v1/models 返回模型列表 JSON 即可达)。④ Ollama 形态检查服务监听:ss -ltn | grep 11434 应有 LISTEN。

Q2:应用内模型下载很慢或失败? Whisper/Parakeet/内置摘要模型的下载源均为 Hugging Face(6.1/6.2/6.3 的 URL 表),跨境链路不稳定时改为手动下载:用 6.1 的 URL 在能高速访问的环境下载 .bin/.gguf 文件,按 6.1 的「文件名」列命名放入对应模型目录(内置摘要模型放 ~/.local/share/com.meetily.ai/models/summary/),重启应用即被识别。文件名必须与目录定义完全一致,否则引擎扫描不到。

Q3:直接改 SQLite 里的 settings 表为什么不生效/有风险? 应用对 settings 表是覆盖式写入(ON CONFLICT(id) DO UPDATE),设置页每次保存都会整行覆盖手改内容——「改了又被冲掉」属正常现象。直改风险包括 Key 字段名拼错(字段名是 groqApiKey 这类驼峰式,非 Rust 字段名)导致提供方静默读不到 Key。结论:运行期配置以设置页为唯一修改入口,sqlite3 只用于只读核对(3.3)。

Q4:自定义模板放进去没生效? 按序检查:① 目录是否为 ~/.local/share/Meetily/templates/(注意是 Meetily 不是 com.meetily.ai,见 7.3);② 文件名是否与要覆盖的内置模板 id 相同(如 standard_meeting.json);③ JSON 是否合法——格式错误时模板加载器会告警并跳过(源码 loader.rs 的 warn 分支),可用 python3 -m json.tool <文件> 校验;④ 修改 sections[].format 只能用 paragraph/list/string 三个枚举值。

Q5:升级版本后配置会丢吗? 不会。运行期配置在应用数据目录的 SQLite 中,与程序本体分离;升级(重新构建安装新版本)后数据目录沿用,模型缓存与配置保留。只有改动 tauri.conf.json 的 identifier 才会导致应用去读新目录(表现为配置「丢失」,旧目录数据仍在,可手动迁移)。

Q6:遗留 backend 的 temp.env/set_env.sh 还需要配置吗? 不需要。那是归档的 Python 后端配置(第八章),新版应用不读取它们;v0.4.1 的 API Key 与端点全部走第五章的数据库配置。仅当确需复现旧版 Docker 部署做历史对照时才涉及(官方明确不支持新装使用)。

十一、参考链接