Skip to content

Commit 45509e0

Browse files
committed
refactor: remove voice recognition feature and related components
- Deleted the VoiceSetting component and its associated files to streamline the settings interface. - Removed voice recognition commands and configurations from the backend, including Whisper-related dependencies. - Updated README files to reflect the removal of offline voice recognition support for Windows. - Adjusted GitHub Actions workflow to eliminate CUDA-related build steps. This change simplifies the project by focusing on core functionalities and removing unused features.
1 parent 0ec691a commit 45509e0

File tree

16 files changed

+25
-1920
lines changed

16 files changed

+25
-1920
lines changed

.github/workflows/app-release.yml

Lines changed: 18 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ on:
1919
description: 'Tag Version (e.g. 1.0.0)'
2020
required: true
2121
type: string
22-
disable-rust-cache:
23-
description: 'Disable Rust cache (useful for troubleshooting build issues)'
24-
required: false
25-
type: boolean
26-
default: false
2722

2823
jobs:
2924
# Set version first
@@ -122,14 +117,8 @@ jobs:
122117
args: '--target x86_64-apple-darwin'
123118
- platform: 'ubuntu-22.04' # Linux Platform
124119
args: ''
125-
- platform: 'windows-latest' # Windows Platform (CPU)
120+
- platform: 'windows-latest' # Windows Platform
126121
args: ''
127-
features: '--features whisper-cpu'
128-
variant: 'cpu'
129-
- platform: 'windows-latest' # Windows Platform (CUDA)
130-
args: ''
131-
features: '--features whisper-cuda'
132-
variant: 'cuda'
133122

134123
runs-on: ${{ matrix.platform }}
135124
steps:
@@ -143,77 +132,21 @@ jobs:
143132
name: tauri-config
144133
path: app/src-tauri/
145134

146-
- name: Install CUDA Toolkit (Windows CUDA)
147-
if: matrix.platform == 'windows-latest' && matrix.variant == 'cuda'
148-
uses: Jimver/[email protected]
149-
id: cuda-toolkit
150-
with:
151-
cuda: '12.5.0'
152-
method: 'network'
153-
sub-packages: '[ "nvcc", "cudart", "cublas", "cublas_dev", "curand", "curand_dev", "visual_studio_integration", "thrust" ]'
154-
155-
- name: Set CUDA environment variables (Windows CUDA)
156-
if: matrix.platform == 'windows-latest' && matrix.variant == 'cuda'
157-
run: |
158-
echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}"
159-
echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
160-
echo "CUDA_PATH=${{steps.cuda-toolkit.outputs.CUDA_PATH}}" >> $GITHUB_ENV
161-
echo "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin" >> $GITHUB_PATH
162-
nvcc -V
163-
164-
165-
- name: Fix CUDA Visual Studio Integration (Windows CUDA)
166-
if: matrix.platform == 'windows-latest' && matrix.variant == 'cuda'
167-
run: |
168-
$cudaPath = "${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
169-
echo "CUDA Path: $cudaPath"
170-
171-
# Source: CUDA Visual Studio integration files
172-
$sourceDir = "$cudaPath\extras\visual_studio_integration\MSBuildExtensions"
173-
echo "Source: $sourceDir"
174-
175-
# Find Visual Studio installation
176-
$vsPaths = @(
177-
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise",
178-
"C:\Program Files\Microsoft Visual Studio\2022\Community",
179-
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"
180-
)
181-
182-
foreach ($vsPath in $vsPaths) {
183-
$destDir = "$vsPath\MSBuild\Microsoft\VC\v170\BuildCustomizations"
184-
if (Test-Path $destDir) {
185-
echo "Found VS at: $vsPath"
186-
echo "Destination: $destDir"
187-
188-
if (Test-Path $sourceDir) {
189-
echo "Copying CUDA integration files..."
190-
Copy-Item "$sourceDir\*" $destDir -Force -Verbose
191-
echo "Successfully copied CUDA integration files to $destDir"
192-
} else {
193-
echo "ERROR: Source directory not found: $sourceDir"
194-
}
195-
break
196-
}
197-
}
198-
199-
# Set environment variable for CMake to use CUDA toolset
200-
echo "CMAKE_GENERATOR_TOOLSET=cuda=$cudaPath" >> $GITHUB_ENV
201-
202135
- name: Fix version format for Windows MSI
203136
if: matrix.platform == 'windows-latest'
204137
run: |
205138
$versionJson = Get-Content -Path app/src-tauri/tauri.conf.json | ConvertFrom-Json
206139
$currentVersion = $versionJson.version
207-
140+
208141
if ($currentVersion -match '-(.+)$') {
209142
$newVersion = $currentVersion -replace '-(.+)$', ''
210-
143+
211144
$versionJson.version = $newVersion
212-
145+
213146
$jsonContent = Get-Content -Path app/src-tauri/tauri.conf.json -Raw
214147
$jsonContent = $jsonContent -replace '"version": "([^"]+)"', "`"version`": `"$newVersion`""
215148
$jsonContent | Set-Content -Path app/src-tauri/tauri.conf.json -NoNewline
216-
149+
217150
echo "Windows version $currentVersion changed to $newVersion"
218151
} else {
219152
echo "Version $currentVersion does not need to be modified"
@@ -243,10 +176,8 @@ jobs:
243176
uses: dtolnay/rust-toolchain@stable
244177
with:
245178
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
246-
components: ${{ matrix.platform == 'windows-latest' && 'rustfmt' || '' }}
247179

248180
- name: Rust Cache
249-
if: github.event.inputs.disable-rust-cache != 'true'
250181
uses: Swatinem/rust-cache@v2
251182
with:
252183
workspaces: app/src-tauri
@@ -263,15 +194,8 @@ jobs:
263194
264195
- name: Install Dependencies
265196
run: |
266-
bun install --frozen-lockfile
267-
268-
269-
# Copy CUDA config for CUDA builds (with installer checks)
270-
- name: Use CUDA config (Windows CUDA)
271-
if: matrix.platform == 'windows-latest' && matrix.variant == 'cuda'
272-
run: |
273-
Copy-Item "app\src-tauri\tauri.cuda.conf.json" "app\src-tauri\tauri.conf.json" -Force
274-
echo "Using CUDA configuration with installer CUDA detection"
197+
bun install
198+
cd app && bun install
275199
276200
# Using official Tauri Action to build and publish
277201
- name: Build and Publish Desktop App
@@ -282,9 +206,10 @@ jobs:
282206
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
283207
with:
284208
projectPath: 'app'
285-
args: ${{ matrix.args }} ${{ matrix.features || '' }}
209+
tauriScript: '../node_modules/.bin/tauri'
210+
args: ${{ matrix.args }}
286211
tagName: ${{ needs.set-version.outputs.version }}
287-
releaseName: Blinko ${{ needs.set-version.outputs.version }}${{ matrix.variant && format(' ({0})', matrix.variant) || '' }}
212+
releaseName: Blinko ${{ needs.set-version.outputs.version }}
288213
releaseBody: "Under construction, full changelog will be updated after build completion..."
289214
releaseDraft: false
290215
prerelease: false
@@ -334,7 +259,6 @@ jobs:
334259
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
335260

336261
- name: Rust Cache
337-
if: github.event.inputs.disable-rust-cache != 'true'
338262
uses: Swatinem/rust-cache@v2
339263
with:
340264
workspaces: app/src-tauri
@@ -356,7 +280,8 @@ jobs:
356280

357281
- name: Install Dependencies
358282
run: |
359-
bun install --frozen-lockfile
283+
bun install
284+
cd app && bun install
360285
361286
- name: Run Prisma Generate
362287
run: bun run prisma:generate
@@ -371,7 +296,9 @@ jobs:
371296
restore-keys: |
372297
${{ runner.os }}-gradle-
373298
374-
299+
- name: Install Tauri CLI
300+
run: cargo install tauri-cli --version "^2.0.0-alpha"
301+
375302
- name: Upload Keystore File
376303
run: |
377304
# Create keystore directory
@@ -498,6 +425,7 @@ jobs:
498425
console.log('Generated Chinese message');
499426
} catch (error) {
500427
console.error('Error calling OpenRouter API:', error.message);
428+
// 如果API调用失败,使用默认消息
501429
const defaultMessage = `🚀 Blinko ${{ needs.set-version.outputs.version }} 已发布!\n\n📝 更新日志:\n${{ needs.generate-changelog.outputs.changelog }}\n\n📥 下载链接:\nhttps://github.com/${{ github.repository }}/releases/tag/${{ needs.set-version.outputs.version }}`;
502430
core.setOutput('message', defaultMessage);
503431
}
@@ -541,6 +469,7 @@ jobs:
541469
console.log('Generated English message');
542470
} catch (error) {
543471
console.error('Error calling OpenRouter API:', error.message);
472+
// 如果API调用失败,使用默认消息
544473
const defaultMessage = `🚀 Blinko ${{ needs.set-version.outputs.version }} has been released!\n\n📝 Changelog:\n${{ needs.generate-changelog.outputs.changelog }}\n\n📥 Download:\nhttps://github.com/${{ github.repository }}/releases/tag/${{ needs.set-version.outputs.version }}`;
545474
core.setOutput('message', defaultMessage);
546475
}
@@ -570,4 +499,4 @@ jobs:
570499
format: html
571500
debug: true
572501
message: |
573-
${{ needs.process-notification.outputs.english_message }}
502+
${{ needs.process-notification.outputs.english_message }}

README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ Blinko is an AI-powered card note-taking project. Designed for individuals who w
5151

5252
- 🔓**Open for Collaboration** :As an open-source project, Blinko invites contributions from the community. All code is transparent and available on GitHub, fostering a spirit of collaboration and constant improvement.
5353

54-
## 🎤 Offline Voice Recognition (Windows)
55-
56-
The Windows desktop version supports offline voice recognition powered by Whisper, allowing you to convert speech to text without internet connectivity.
57-
58-
### Available Versions
59-
- **Blinko.exe** - CPU-only version for all systems
60-
- **Blinko(CUDA).exe** - GPU-accelerated version for NVIDIA graphics cards
61-
- **Requires [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads) to be installed, otherwise installation will fail due to missing runtime environment**
62-
- Provides significantly faster transcription performance
63-
- Requires manual download of Whisper models from [Hugging Face](https://huggingface.co/ggerganov/whisper.cpp/tree/main)
64-
6554
## 📦Start with Docker in seconds
6655

6756
```bash

README.zh-CN.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,6 @@ Blinko 是一个AI驱动的卡片笔记项目,专为那些想要快速捕捉
4848

4949
- 🔓**开放协作**:作为开源项目,Blinko 欢迎社区贡献。所有代码都在 GitHub 上公开透明,培养协作和持续改进的精神。
5050

51-
## 🎤 离线语音识别 (Windows)
52-
53-
Windows 桌面版支持基于 Whisper 的离线语音识别功能,让您无需网络连接即可将语音转换为文字。
54-
55-
### 可用版本
56-
- **Blinko.exe** - CPU版本,适用于所有系统
57-
- **Blinko(CUDA).exe** - GPU加速版本,专为NVIDIA显卡优化
58-
- **必须先安装 [CUDA工具包](https://developer.nvidia.com/cuda-downloads),否则会因缺少运行环境导致安装报错**
59-
- 提供显著更快的转录性能
60-
- 需要手动从 [Hugging Face](https://huggingface.co/ggerganov/whisper.cpp/tree/main) 下载 Whisper 模型
61-
6251
## 🤖 AI 模型支持
6352
### OpenAI
6453
- 支持 OpenAI API

0 commit comments

Comments
 (0)