mirror of
https://github.com/Melorise/TamaASR.git
synced 2026-11-07 14:39:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2dc33e6d12 | ||
|
|
1a62ad731e | ||
|
|
371e1af92d | ||
|
|
cd9c6f28ee | ||
|
|
e43efa24f9 | ||
|
|
2033f4ccff | ||
|
|
04c1b82d5f | ||
|
|
3e04e30b24 | ||
|
|
5b55b0eaf9 | ||
|
|
18ed2eb43a | ||
|
|
58be580578 | ||
|
|
6c940939b1 | ||
|
|
fd3ab43b94 | ||
|
|
6b0a9716fa |
@@ -2,7 +2,7 @@
|
||||
|
||||
## 项目范围
|
||||
|
||||
TamaASR 是仅面向 Linux 的 Fcitx5 桌面语音输入工具。项目名为 `TamaASR`,分发包名为 `tama-asr`,当前版本为 `1.0.2`。
|
||||
TamaASR 是仅面向 Linux 的 Fcitx5 桌面语音输入工具。项目名为 `TamaASR`,分发包名为 `tama-asr`,当前版本为 `1.0.3`。
|
||||
|
||||
不得恢复 Windows、PowerShell 或 Tauri 输出路径。发行版差异只能存在于依赖说明和打包配置,不能进入语音输入核心逻辑。
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
本项目遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 的格式。
|
||||
|
||||
## [1.0.3] - 2026-10-07
|
||||
|
||||
### 修复
|
||||
|
||||
- 适配新版千问网页的录音状态标记,修复松开快捷键后未点击停止按钮、悬浮球持续停留在黄色终止状态的问题。
|
||||
- Nix 包启动时显式使用 XWayland,与其他发行版的启动参数保持一致。
|
||||
|
||||
## [1.0.2] - 2026-09-04
|
||||
|
||||
### 修复
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## 项目范围
|
||||
|
||||
TamaASR 是仅面向 Linux 的 Fcitx5 桌面语音输入工具。项目名为 `TamaASR`,分发包名为 `tama-asr`,当前版本为 `1.0.2`。
|
||||
TamaASR 是仅面向 Linux 的 Fcitx5 桌面语音输入工具。项目名为 `TamaASR`,分发包名为 `tama-asr`,当前版本为 `1.0.3`。
|
||||
|
||||
不得恢复 Windows、PowerShell 或 Tauri 输出路径。发行版差异只能存在于依赖说明和打包配置,不能进入语音输入核心逻辑。
|
||||
|
||||
|
||||
Generated
+3
-3
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1788283238,
|
||||
"narHash": "sha256-iFgPO6h9A+vvC8auAY2DBJv1t01vRRS6EWbUUqmEh0c=",
|
||||
"lastModified": 1793736589,
|
||||
"narHash": "sha256-YWUuFS//ELGEQ9I7dEr062k1HfCJoltWfSMsbbyfwr4=",
|
||||
"owner": "Melorise",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "800023974a51c7b559d9ae8c489f3de3abdb14f0",
|
||||
"rev": "aabd77fee9c672bf99b13c44baef407e84a35f9a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(tama-asr-fcitx5 VERSION 1.0.2 LANGUAGES CXX)
|
||||
project(tama-asr-fcitx5 VERSION 1.0.3 LANGUAGES CXX)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(CTest)
|
||||
|
||||
@@ -6,7 +6,7 @@ Comment[zh_CN]=将 TamaASR 网页后端连接到当前输入上下文
|
||||
Type=SharedLibrary
|
||||
Library=@TAMA_ASR_LIBRARY_PATH@
|
||||
Category=Module
|
||||
Version=1.0.2
|
||||
Version=1.0.3
|
||||
OnDemand=False
|
||||
Configurable=False
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tama-asr",
|
||||
"productName": "TamaASR",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@11.21.0",
|
||||
"author": "TamaASR contributors",
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
# Linux 分发打包
|
||||
|
||||
TamaASR 1.0.2 的系统包由两部分组成:
|
||||
TamaASR 1.0.3 的系统包由两部分组成:
|
||||
|
||||
- Electron 应用安装到 `/opt/tama-asr`,命令入口为 `/usr/bin/tama-asr`;
|
||||
- Fcitx5 常驻 addon 由目标发行版中的 CMake/Fcitx5 开发包编译,并安装到该环境报告的 addon 目录。
|
||||
|
||||
安装包同时提供桌面入口、项目图标和 `/etc/xdg/autostart/tama-asr.desktop`,因此安装后的默认行为是随桌面会话启动。设置页关闭自启动时,应用需要在用户级 autostart 目录写入覆盖项,不能删除系统包所属文件。
|
||||
|
||||
`tama-asr` 1.0.2 的 deb、RPM 和 Arch 元数据均声明替换旧 `meloasr` 包;通过对应发行版的包管理器安装新包时,旧应用、Fcitx5 addon 和桌面文件会一并卸载。
|
||||
`tama-asr` 1.0.3 的 deb、RPM 和 Arch 元数据均声明替换旧 `meloasr` 包;通过对应发行版的包管理器安装新包时,旧应用、Fcitx5 addon 和桌面文件会一并卸载。
|
||||
|
||||
## 统一构建契约
|
||||
|
||||
@@ -42,7 +42,7 @@ pnpm run build:linux:dir
|
||||
packaging/deb/build-deb.sh
|
||||
```
|
||||
|
||||
产物位于 `packaging/out/tama-asr_1.0.2_<arch>.deb`。依赖名称按 Debian/Ubuntu 系列填写,但尚未在各发行版完成安装验证。
|
||||
产物位于 `packaging/out/tama-asr_1.0.3_<arch>.deb`。依赖名称按 Debian/Ubuntu 系列填写,但尚未在各发行版完成安装验证。
|
||||
|
||||
## rpm
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pkgname=tama-asr
|
||||
pkgver=1.0.2
|
||||
pkgver=1.0.3
|
||||
pkgrel=1
|
||||
pkgdesc='Web-backed voice input for Fcitx5'
|
||||
arch=('x86_64' 'aarch64')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pkgname=tama-asr
|
||||
pkgver=1.0.2
|
||||
pkgver=1.0.3
|
||||
pkgrel=1
|
||||
pkgdesc='Web-backed voice input for Fcitx5'
|
||||
arch=('x86_64')
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
```bash
|
||||
curl --fail --location --remote-name \
|
||||
https://github.com/Melorise/TamaASR/releases/download/v1.0.2/PKGBUILD
|
||||
https://github.com/Melorise/TamaASR/releases/download/v1.0.3/PKGBUILD
|
||||
makepkg --syncdeps --cleanbuild
|
||||
```
|
||||
|
||||
@@ -20,7 +20,7 @@ makepkg --syncdeps --cleanbuild
|
||||
|
||||
```bash
|
||||
curl --fail --location --remote-name \
|
||||
https://github.com/Melorise/TamaASR/releases/download/v1.0.2/PKGBUILD-from-source
|
||||
https://github.com/Melorise/TamaASR/releases/download/v1.0.3/PKGBUILD-from-source
|
||||
makepkg --syncdeps --cleanbuild -p PKGBUILD-from-source
|
||||
```
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<binary>tama-asr</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="1.0.3" date="2026-10-07"/>
|
||||
<release version="1.0.2" date="2026-09-04"/>
|
||||
<release version="1.0.1" date="2026-09-01"/>
|
||||
<release version="1.0.0" date="2026-09-01"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
project_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
version="${TAMA_ASR_VERSION:-1.0.2}"
|
||||
version="${TAMA_ASR_VERSION:-1.0.3}"
|
||||
arch="${TAMA_ASR_DEB_ARCH:-$(dpkg --print-architecture)}"
|
||||
app_dir="${1:-${TAMA_ASR_ELECTRON_APP_DIR:-${project_dir}/release/linux-unpacked}}"
|
||||
work_dir="${project_dir}/packaging/out/deb-root"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
, nodejs
|
||||
, pnpm_11
|
||||
, pnpmConfigHook
|
||||
, electron
|
||||
, electron_44
|
||||
, cmake
|
||||
, pkg-config
|
||||
, makeWrapper
|
||||
@@ -84,7 +84,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"$out/share/pixmaps/tama-asr.png"
|
||||
|
||||
cmake --install build/fcitx5
|
||||
makeWrapper ${electron}/bin/electron "$out/bin/tama-asr" \
|
||||
makeWrapper ${electron_44}/bin/electron "$out/bin/tama-asr" \
|
||||
--add-flags "--ozone-platform=x11" \
|
||||
--add-flags "$appDir"
|
||||
|
||||
runHook postInstall
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
project_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
version="${TAMA_ASR_VERSION:-1.0.2}"
|
||||
version="${TAMA_ASR_VERSION:-1.0.3}"
|
||||
app_dir="${1:-${TAMA_ASR_ELECTRON_APP_DIR:-${project_dir}/release/linux-unpacked}}"
|
||||
stage_dir="${project_dir}/packaging/out/rpm-root"
|
||||
top_dir="${project_dir}/packaging/out/rpmbuild"
|
||||
|
||||
@@ -38,6 +38,10 @@ tar -C %{buildroot} -xzf %{SOURCE0}
|
||||
/etc/xdg/autostart/tama-asr.desktop
|
||||
|
||||
%changelog
|
||||
* Wed Oct 07 2026 TamaASR contributors - 1.0.3-1
|
||||
- 适配新版千问录音状态,修复松开快捷键后无法终止的问题。
|
||||
- Nix 启动参数与其他发行版保持一致,显式使用 XWayland。
|
||||
|
||||
* Fri Sep 04 2026 TamaASR contributors - 1.0.2-1
|
||||
- 修复快速停止可能使网页录音状态与外部会话不同步的问题。
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ export const qianwenAdapter: BackendWebAdapter = {
|
||||
isRecording(document) {
|
||||
const microphone = this.findMicrophone(document);
|
||||
return microphone?.getAttribute('aria-pressed') === 'true' ||
|
||||
microphone?.classList.contains('bg-tag') === true ||
|
||||
/停止语音|stop\s*(voice|recording|input)/i.test(microphone ? controlDescription(microphone) : '');
|
||||
},
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { qianwenAdapter } from '../src/backends/qianwen';
|
||||
import { shouldClickMicrophoneOnStop } from '../src/preload/speech-session-state';
|
||||
|
||||
function microphone(className: string, attributes: Record<string, string | undefined> = {}): HTMLElement {
|
||||
return {
|
||||
classList: { contains: (token: string) => className.split(/\s+/).includes(token) },
|
||||
getAttribute: (name: string) => name === 'class' ? className : attributes[name] ?? null,
|
||||
querySelector: () => null,
|
||||
textContent: ''
|
||||
} as unknown as HTMLElement;
|
||||
}
|
||||
|
||||
test('千问新版录音样式允许点击停止,恢复空闲样式后不再判为录音', () => {
|
||||
let control = microphone('cursor-pointer hover:bg-tag');
|
||||
const adapter = { ...qianwenAdapter, findMicrophone: () => control };
|
||||
const document = {} as Document;
|
||||
assert.equal(adapter.isRecording(document), false);
|
||||
|
||||
control = microphone('pointer-events-auto cursor-pointer bg-tag');
|
||||
assert.equal(adapter.isRecording(document), true);
|
||||
assert.equal(shouldClickMicrophoneOnStop(adapter.isRecording(document), false), true);
|
||||
assert.equal(shouldClickMicrophoneOnStop(adapter.isRecording(document), true), false);
|
||||
|
||||
control = microphone('cursor-pointer hover:bg-tag');
|
||||
assert.equal(adapter.isRecording(document), false);
|
||||
});
|
||||
|
||||
test('千问旧版 aria 和停止文案保持兼容', () => {
|
||||
for (const attributes of [{ 'aria-pressed': 'true' }, { 'aria-label': '停止语音' }]) {
|
||||
const adapter = { ...qianwenAdapter, findMicrophone: () => microphone('', attributes) };
|
||||
assert.equal(adapter.isRecording({} as Document), true);
|
||||
}
|
||||
const adapter = { ...qianwenAdapter, findMicrophone: () => null };
|
||||
assert.equal(adapter.isRecording({} as Document), false);
|
||||
});
|
||||
Reference in New Issue
Block a user