mirror of
https://github.com/Melorise/TamaASR.git
synced 2026-11-07 14:39:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbe34e91ef | ||
|
|
8f8244af05 | ||
|
|
6ea57c6375 | ||
|
|
adfa4df236 | ||
|
|
cd3fc9a7d7 |
@@ -2,7 +2,7 @@
|
||||
|
||||
## 项目范围
|
||||
|
||||
MeloASR 是仅面向 Linux 的 Fcitx5 桌面语音输入工具。项目名为 `MeloASR`,分发包名为 `meloasr`,当前版本为 `0.1.11`。
|
||||
MeloASR 是仅面向 Linux 的 Fcitx5 桌面语音输入工具。项目名为 `MeloASR`,分发包名为 `meloasr`,当前版本为 `0.1.13`。
|
||||
|
||||
不得恢复 Windows、PowerShell 或 Tauri 输出路径。发行版差异只能存在于依赖说明和打包配置,不能进入语音输入核心逻辑。
|
||||
|
||||
|
||||
@@ -2,6 +2,19 @@
|
||||
|
||||
本项目遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 的格式。
|
||||
|
||||
## [0.1.13] - 2026-08-24
|
||||
|
||||
### 变更
|
||||
|
||||
- 设置页改为按需创建,关闭窗口后立即销毁其 renderer 以降低常驻内存。
|
||||
- 缩小设置页默认与最小窗口尺寸,使其匹配当前功能密度。
|
||||
|
||||
## [0.1.12] - 2026-08-23
|
||||
|
||||
### 变更
|
||||
|
||||
- 全平台启动时强制禁用 Electron GPU 硬件加速,降低后台网页 renderer 的无效显存与内存占用。
|
||||
|
||||
## [0.1.11] - 2026-08-23
|
||||
|
||||
### 变更
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## 项目范围
|
||||
|
||||
MeloASR 是仅面向 Linux 的 Fcitx5 桌面语音输入工具。项目名为 `MeloASR`,分发包名为 `meloasr`,当前版本为 `0.1.11`。
|
||||
MeloASR 是仅面向 Linux 的 Fcitx5 桌面语音输入工具。项目名为 `MeloASR`,分发包名为 `meloasr`,当前版本为 `0.1.13`。
|
||||
|
||||
不得恢复 Windows、PowerShell 或 Tauri 输出路径。发行版差异只能存在于依赖说明和打包配置,不能进入语音输入核心逻辑。
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# MeloASR
|
||||
|
||||
大模型的进步推动了自然语言处理的进化,语音输入正在成为主流。在其它桌面平台下,微信输入法,豆包输入法,千问输入法等支持语音输入甚至以此为卖点的新兴中文输入法正在成为主流。
|
||||
大模型的进步推动了自然语言处理的进化,语音输入正在成为主流。在其它桌面平台下,微信输入法,豆包输入法,千问输入法等支持语音输入甚至以此为卖点的新兴中文输入法层出不穷。
|
||||
而在linux下,相关领域却长期空白,现有实现主要聚焦于以下几种类型:
|
||||
|
||||
|
||||
api调用——调用各大ai厂商的语音转文字api。显然,该方案最大的问题在于——要钱。
|
||||
api调用——调用各大ai厂商的语音转文字api。显然,该方案最大的问题在于——要钱。
|
||||
本地模型——识别准确率低,技术落后,和其他平台的能实时校正的ai语音输入根本不是一个量级的东西,尤其是针对中文环境。
|
||||
|
||||
我们注意到,很多大模型的网页对话窗口,都支持语音输入,而且完全免费——因为语音输入最后只是输入到文本框,并没有发送实际的对话请求,而大模型就算是付费也往往是根据对话请求来计费的。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(meloasr-fcitx5 VERSION 0.1.11 LANGUAGES CXX)
|
||||
project(meloasr-fcitx5 VERSION 0.1.13 LANGUAGES CXX)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(CTest)
|
||||
|
||||
@@ -6,7 +6,7 @@ Comment[zh_CN]=将 MeloASR 网页后端连接到当前输入上下文
|
||||
Type=SharedLibrary
|
||||
Library=@MELOASR_LIBRARY_PATH@
|
||||
Category=Module
|
||||
Version=0.1.11
|
||||
Version=0.1.13
|
||||
OnDemand=False
|
||||
Configurable=False
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "meloasr",
|
||||
"version": "0.1.11",
|
||||
"version": "0.1.13",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "meloasr",
|
||||
"version": "0.1.11",
|
||||
"version": "0.1.13",
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.0.0",
|
||||
"electron": "42.3.0",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "meloasr",
|
||||
"productName": "MeloASR",
|
||||
"version": "0.1.11",
|
||||
"version": "0.1.13",
|
||||
"private": true,
|
||||
"author": "MeloASR contributors",
|
||||
"description": "基于网页语音识别后端和 Fcitx5 的 Linux 实时语音输入工具",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
# Linux 分发打包
|
||||
|
||||
MeloASR 0.1.11 的系统包由两部分组成:
|
||||
MeloASR 0.1.13 的系统包由两部分组成:
|
||||
|
||||
- Electron 应用安装到 `/opt/meloasr`,命令入口为 `/usr/bin/meloasr`;
|
||||
- Fcitx5 常驻 addon 由目标发行版中的 CMake/Fcitx5 开发包编译,并安装到该环境报告的 addon 目录。
|
||||
@@ -40,7 +40,7 @@ npm run build:linux:dir
|
||||
packaging/deb/build-deb.sh
|
||||
```
|
||||
|
||||
产物位于 `packaging/out/meloasr_0.1.11_<arch>.deb`。依赖名称按 Debian/Ubuntu 系列填写,但尚未在各发行版完成安装验证。
|
||||
产物位于 `packaging/out/meloasr_0.1.13_<arch>.deb`。依赖名称按 Debian/Ubuntu 系列填写,但尚未在各发行版完成安装验证。
|
||||
|
||||
## rpm
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pkgname=meloasr
|
||||
pkgver=0.1.11
|
||||
pkgver=0.1.13
|
||||
pkgrel=1
|
||||
pkgdesc='Web-backed voice input for Fcitx5'
|
||||
arch=('x86_64')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Arch Linux 构建
|
||||
|
||||
发布时把项目源码归档为 `meloasr-0.1.11.tar.gz`,与 `PKGBUILD` 放在同一目录,随后运行:
|
||||
发布时把项目源码归档为 `meloasr-0.1.13.tar.gz`,与 `PKGBUILD` 放在同一目录,随后运行:
|
||||
|
||||
```bash
|
||||
makepkg --syncdeps --cleanbuild
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
<binary>meloasr</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="0.1.13" date="2026-08-24"/>
|
||||
<release version="0.1.12" date="2026-08-23"/>
|
||||
<release version="0.1.11" date="2026-08-23"/>
|
||||
<release version="0.1.10" date="2026-08-23"/>
|
||||
<release version="0.1.9" date="2026-08-23"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
project_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
version="${MELOASR_VERSION:-0.1.11}"
|
||||
version="${MELOASR_VERSION:-0.1.13}"
|
||||
arch="${MELOASR_DEB_ARCH:-$(dpkg --print-architecture)}"
|
||||
app_dir="${1:-${MELOASR_ELECTRON_APP_DIR:-${project_dir}/release/linux-unpacked}}"
|
||||
work_dir="${project_dir}/packaging/out/deb-root"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
project_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
version="${MELOASR_VERSION:-0.1.11}"
|
||||
version="${MELOASR_VERSION:-0.1.13}"
|
||||
app_dir="${1:-${MELOASR_ELECTRON_APP_DIR:-${project_dir}/release/linux-unpacked}}"
|
||||
stage_dir="${project_dir}/packaging/out/rpm-root"
|
||||
top_dir="${project_dir}/packaging/out/rpmbuild"
|
||||
|
||||
@@ -36,6 +36,12 @@ tar -C %{buildroot} -xzf %{SOURCE0}
|
||||
/etc/xdg/autostart/meloasr.desktop
|
||||
|
||||
%changelog
|
||||
* Mon Aug 24 2026 MeloASR contributors - 0.1.13-1
|
||||
- Create the settings renderer only when it is opened and destroy it on close.
|
||||
|
||||
* Sun Aug 23 2026 MeloASR contributors - 0.1.12-1
|
||||
- Disable Electron GPU acceleration for background web renderers.
|
||||
|
||||
* Sun Aug 23 2026 MeloASR contributors - 0.1.11-1
|
||||
- Release only the selected speech backend renderer.
|
||||
- Keep the overlay as a non-interactive session status indicator.
|
||||
|
||||
+3
-3
@@ -10,6 +10,8 @@ import { TrayController } from './tray-controller';
|
||||
import type { BackendStatusPayload, Point } from '../shared/contracts';
|
||||
|
||||
app.setName('MeloASR');
|
||||
app.disableHardwareAcceleration();
|
||||
app.commandLine.appendSwitch('disable-gpu');
|
||||
const singleInstance = app.requestSingleInstanceLock();
|
||||
|
||||
if (!singleInstance) {
|
||||
@@ -37,9 +39,7 @@ async function bootstrap(): Promise<void> {
|
||||
const repositoryUrl = process.env.MELOASR_REPOSITORY_URL?.trim() ||
|
||||
'https://github.com/Melorise/MeloASR';
|
||||
const settingsWindow = new SettingsWindow(settings, backends, overlay, sessions, repositoryUrl);
|
||||
const settingsWindowReady = settingsWindow.create();
|
||||
registerIpc({ settings, autoStart, bridge, backends, overlay, sessions, settingsWindow });
|
||||
await settingsWindowReady;
|
||||
const tray = new TrayController(
|
||||
backends,
|
||||
settingsWindow,
|
||||
@@ -66,7 +66,7 @@ async function bootstrap(): Promise<void> {
|
||||
await backends.ensure(settings.get().backendId);
|
||||
tray.refresh();
|
||||
|
||||
app.on('second-instance', () => settingsWindow.show());
|
||||
app.on('second-instance', () => void settingsWindow.show());
|
||||
app.on('before-quit', () => { (app as typeof app & { isQuitting?: boolean }).isQuitting = true; });
|
||||
app.on('will-quit', () => {
|
||||
tray.destroy();
|
||||
|
||||
+29
-16
@@ -9,6 +9,7 @@ import type { SettingsStore } from './settings-store';
|
||||
|
||||
export class SettingsWindow {
|
||||
window: BrowserWindow | null = null;
|
||||
private creating: Promise<BrowserWindow> | null = null;
|
||||
|
||||
constructor(
|
||||
private readonly settings: SettingsStore,
|
||||
@@ -18,12 +19,23 @@ export class SettingsWindow {
|
||||
private readonly repositoryUrl: string | null
|
||||
) {}
|
||||
|
||||
async create(): Promise<void> {
|
||||
this.window = new BrowserWindow({
|
||||
width: 720,
|
||||
height: 820,
|
||||
minWidth: 640,
|
||||
minHeight: 680,
|
||||
private async ensureWindow(): Promise<BrowserWindow> {
|
||||
if (this.window && !this.window.isDestroyed()) return this.window;
|
||||
if (this.creating) return this.creating;
|
||||
this.creating = this.createWindow();
|
||||
try {
|
||||
return await this.creating;
|
||||
} finally {
|
||||
this.creating = null;
|
||||
}
|
||||
}
|
||||
|
||||
private async createWindow(): Promise<BrowserWindow> {
|
||||
const window = new BrowserWindow({
|
||||
width: 600,
|
||||
height: 650,
|
||||
minWidth: 560,
|
||||
minHeight: 560,
|
||||
show: false,
|
||||
title: 'MeloASR 设置',
|
||||
autoHideMenuBar: true,
|
||||
@@ -35,18 +47,19 @@ export class SettingsWindow {
|
||||
sandbox: true
|
||||
}
|
||||
});
|
||||
this.window.on('close', (event) => {
|
||||
if ((app as typeof app & { isQuitting?: boolean }).isQuitting) return;
|
||||
event.preventDefault();
|
||||
this.window?.hide();
|
||||
this.window = window;
|
||||
window.on('closed', () => {
|
||||
this.overlay.endPositioning();
|
||||
if (this.window === window) this.window = null;
|
||||
});
|
||||
this.window.on('hide', () => this.overlay.endPositioning());
|
||||
await this.window.loadFile(path.join(__dirname, '..', 'renderer', 'settings.html'));
|
||||
await window.loadFile(path.join(__dirname, '..', 'renderer', 'settings.html'));
|
||||
return window;
|
||||
}
|
||||
|
||||
show(): void {
|
||||
this.window?.show();
|
||||
this.window?.focus();
|
||||
async show(): Promise<void> {
|
||||
const window = await this.ensureWindow();
|
||||
window.show();
|
||||
window.focus();
|
||||
this.publish();
|
||||
}
|
||||
|
||||
@@ -60,7 +73,7 @@ export class SettingsWindow {
|
||||
const definition = this.backends.activeDefinition();
|
||||
const decision = resolveDebugLoginAction(Boolean(current.loginNoticeShown[definition.id]), confirmed);
|
||||
if (decision.action === 'prompt') {
|
||||
this.show();
|
||||
await this.show();
|
||||
this.window?.webContents.send('settings:login-notice', { backendLabel: definition.label });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export class TrayController {
|
||||
create(): void {
|
||||
this.tray = new Tray(trayImage('loading'));
|
||||
this.tray.setToolTip('MeloASR · 正在加载');
|
||||
this.tray.on('click', () => this.settingsWindow.show());
|
||||
this.tray.on('click', () => void this.settingsWindow.show());
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export class TrayController {
|
||||
this.tray.setImage(trayImage(state));
|
||||
this.tray.setToolTip(`MeloASR · ${status.detail}`);
|
||||
this.tray.setContextMenu(Menu.buildFromTemplate([
|
||||
{ label: '设置', click: () => this.settingsWindow.show() },
|
||||
{ label: '设置', click: () => void this.settingsWindow.show() },
|
||||
{ label: '打开登录/调试页面', click: () => void this.settingsWindow.openDebug() },
|
||||
{ type: 'separator' },
|
||||
{ label: '重启', click: this.onRestart },
|
||||
|
||||
Reference in New Issue
Block a user