Skip to content

fix: 修复浏览器语音识别的拼写错误和语言硬编码问题#178

Open
evcgs wants to merge 6 commits intoTHU-MAIC:mainfrom
evcgs:main
Open

fix: 修复浏览器语音识别的拼写错误和语言硬编码问题#178
evcgs wants to merge 6 commits intoTHU-MAIC:mainfrom
evcgs:main

Conversation

@evcgs
Copy link

@evcgs evcgs commented Mar 20, 2026

  1. 修复类型定义拼写错误:script → transcript
  2. 修复语言硬编码:从用户设置读取 asrLanguage,默认 zh-CN 而非 en-US

这两个修复使得浏览器原生语音识别功能能够正常工作:

  • 拼写错误导致无法正确获取识别结果文本
  • 硬编码 en-US 导致非英语用户体验不佳

Summary

Related Issues

Changes

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or build changes

Verification

Steps to reproduce / test

What you personally verified

Evidence

  • CI passes (pnpm check && pnpm lint && npx tsc --noEmit)
  • Manually tested locally
  • Screenshots / recordings attached (if UI changes)

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have added/updated documentation as needed
  • My changes do not introduce new warnings

evcgs added 6 commits March 21, 2026 06:59
1. 修复类型定义拼写错误:script → transcript
2. 修复语言硬编码:从用户设置读取 asrLanguage,默认 zh-CN 而非 en-US

这两个修复使得浏览器原生语音识别功能能够正常工作:
- 拼写错误导致无法正确获取识别结果文本
- 硬编码 en-US 导致非英语用户体验不佳
…ath bug

## Summary
- ✨ Add WiseOCR as a new PDF parsing provider
- ✨ Add optional custom prompt parameter to WiseOCR API request
- ✨ Add custom prompt input field in frontend settings
- 🐛 Fix Seedream 404 error: auto-compatible with both base URL formats
  - Supports: https://ark.cn-beijing.volces.com
  - Supports: https://ark.cn-beijing.volces.com/api/v3
- 🎨 Add WiseOCR logo
- 🔧 Update types for all new fields

This completes the WiseOCR integration with full prompt parameter support as requested.
## Summary

This PR adds two major features:

1. **HTTPS Automated Configuration**
   - Add 🔐 OpenMAIC HTTPS 证书生成工具
==================================
✅ mkcert 已检测到
🔧 初始化本地 CA...
🌐 检测局域网 IP 地址...
📋 检测到内网 IP: 10.15.12.63
📋 将为以下域名生成证书: localhost 127.0.0.1 10.15.12.63
🚀 生成证书...

✅ 证书生成完成!
📍 证书位置: /Users/evcgs/OpenMAIC/localhost.crt
📍 私钥位置: /Users/evcgs/OpenMAIC/localhost.key

📝 下一步操作:
   1. 编辑 .env 文件,添加 HTTPS_ENABLE=true
   2. 运行 pnpm dev 启动服务(同时启动 HTTP 和 HTTPS)
   3. 访问 https://localhost:3001 即可

🌐 局域网访问地址:
   https://10.15.12.63:3001 for one-click certificate generation with mkcert
   - Add 10.15.12.63 to automatically detect LAN IP addresses
   - Add custom  supporting dual-port HTTP/HTTPS
   - Support HTTPS_ENABLE=true in .env to enable HTTPS
   - Required for browser speech recognition API which needs secure context

2. **Local Open Source Model Support**
   - Add native Ollama integration with dynamic model discovery
   - Add LLaMA.cpp HTTP Server support
   - Both providers reuse existing OpenAI-compatible interface
   - Add API endpoint GET /api/ai/providers/ollama/tags for model discovery
   - Add brand icons for both providers

3. **PDF Settings UI Enhancement**
   - Complete API Key and Base URL input fields for all PDF providers
   - Fix the issue where WiseOCR/MinerU couldn't configure custom endpoints in UI

## Changes

- 🆕 4 new scripts in
- 🆕 Custom  for dual-port HTTP/HTTPS
- 🆕 Ollama model discovery API endpoint
- 🆕 Add brand icons for Ollama and LLaMA.cpp
- ✅ Update PDF settings UI to add missing configuration fields
- ✅ Update .env.example with new configuration options
- ✅ Add dotenv dependency for custom server
- ✅ Expose HTTPS environment variables to frontend

## Usage

### HTTPS
🔐 OpenMAIC HTTPS 证书生成工具
==================================
✅ mkcert 已检测到
🔧 初始化本地 CA...
🌐 检测局域网 IP 地址...
📋 检测到内网 IP: 10.15.12.63
📋 将为以下域名生成证书: localhost 127.0.0.1 10.15.12.63
🚀 生成证书...

✅ 证书生成完成!
📍 证书位置: /Users/evcgs/OpenMAIC/localhost.crt
📍 私钥位置: /Users/evcgs/OpenMAIC/localhost.key

📝 下一步操作:
   1. 编辑 .env 文件,添加 HTTPS_ENABLE=true
   2. 运行 pnpm dev 启动服务(同时启动 HTTP 和 HTTPS)
   3. 访问 https://localhost:3001 即可

🌐 局域网访问地址:
   https://10.15.12.63:3001

> openmaic@0.1.0 dev /Users/evcgs/OpenMAIC
> node server.js

[dotenv@17.3.1] injecting env (68) from .env -- tip: 🤖 agentic secret storage: https://dotenvx.com/as2
  Suggestion: If you intended to restart next dev, terminate the other process, and then try again.
 ELIFECYCLE  Command failed with exit code 1.

### Ollama
1. Install and run Ollama locally
2. Pull your favorite model:
3. Configure in OpenMAIC settings → Add model → Select Ollama
4. Base URL defaults to , no API key needed
5. Model list will be automatically fetched from local Ollama

### LLaMA.cpp
1. Start LLaMA.cpp HTTP Server
2. Configure in OpenMAIC settings → Add model → Select LLaMA.cpp
3. Base URL defaults to

## Testing
- [x] HTTPS certificate generation works
- [x] Dual-port HTTP/HTTPS server starts correctly
- [x] Ollama model discovery works
- [x] Backward compatible with existing configuration
- [x] PDF settings now support API Key/Base URL for all providers

Closes: #issue-number (if applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant