Skip to content
SallyZhou9527Public

About

Windows voice-assisted teleprompter built with Tauri, React, and local ASR.

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

Prompter

Prompter 是一个面向 Windows 现场演讲、发布会、主持和录制场景的桌面提词器。它用 React 构建控制台界面,用 Tauri/Rust 处理本地音频输入、离线语音识别、稿件导入和独立字幕输出窗口。

项目的核心目标是让演讲者在不依赖云端服务的情况下,把稿件、实时语音和外接屏字幕联动起来:控制端负责导入稿件、选择麦克风、查看识别状态和手动校正进度;字幕端可以投放到舞台提示屏、返看屏或提词器显示设备上。

功能特性

  • 本地离线语音识别辅助跟稿。
  • 支持 sherpa-onnx streaming 和 Vosk 两种 ASR 后端。
  • 支持选择音频输入设备,并提供输入电平诊断。
  • 支持导入 TXT、Markdown、PPTX 演讲者备注和 DOCX 文档。
  • 提供独立字幕输出窗口,支持选择屏幕、水平镜像、上下翻转、反向滚动、字号、行距和字幕宽度设置。
  • 本地优先运行:安装所需模型后,音频识别在用户机器上完成。

技术栈

  • Tauri 2
  • Rust 2021
  • React 18
  • TypeScript
  • Vite

环境要求

  • Windows 10 或更高版本。
  • Node.js 20 或更高版本。
  • Rust stable toolchain,并安装 x86_64-pc-windows-msvc target。
  • Microsoft Visual Studio Build Tools,或安装了 C++ desktop workload 的 Visual Studio。
  • Git。

应用会在 models/ 目录下查找本地 ASR 模型。模型文件通常较大,因此不会提交到仓库。

安装与准备

安装 JavaScript 依赖:

npm install

下载 sherpa-onnx streaming ASR 模型:

.\scripts\download-asr-model.ps1

安装 Vosk Windows 运行时:

.\scripts\install-vosk-runtime.ps1

如果要使用 Vosk 识别,还需要把 Vosk 模型目录放到:

models/vosk/model/

例如,下载并解压兼容的 Vosk 模型后,目录结构可以是:

models/vosk/model/vosk-model-small-cn-0.22/
models/vosk/lib/libvosk.dll
models/vosk/lib/libvosk.lib

本地开发

启动 Tauri 开发应用:

npm run tauri:dev

运行前端类型检查和生产构建:

npm run build

运行 Rust 测试:

cargo test --manifest-path src-tauri\Cargo.toml

生产构建

构建桌面应用:

npm run tauri:build

生成的安装包、可执行文件、调试符号、本地下载模型和日志文件都会被 git 忽略。

仓库结构

src/                 React 前端应用
src-tauri/           Tauri/Rust 桌面端后端
scripts/             本地 ASR 资源辅助脚本
samples/             示例稿件

语音资源说明

本仓库开源的是应用源代码。语音模型和 ASR 原生运行时二进制文件没有随仓库分发,主要原因是文件体积较大,并且需要遵循上游项目各自的许可条款。请使用仓库中的脚本和上游发布包在本地填充 models/ 目录。

许可证

本项目使用 MIT License。详见 LICENSE。


Prompter

Prompter is a Windows desktop teleprompter for live presentations, events, hosting, and recording workflows. It combines a React control window with a Tauri/Rust backend for local audio input, offline speech recognition, script import, and a separate caption output window.

The goal is to connect scripts, live speech, and external caption displays without depending on a cloud service. The control window is used for importing scripts, selecting microphones, checking recognition status, and manually correcting progress. The caption window can be sent to a stage confidence monitor, return display, or teleprompter device.

Features

  • Offline speech-assisted script following.
  • Two ASR backends: sherpa-onnx streaming and Vosk.
  • Audio input selection and input-level diagnostics.
  • Script import from TXT, Markdown, PPTX speaker notes, and DOCX.
  • Separate caption output window with display selection, mirroring, flipping, reverse scroll, font size, line height, and content width controls.
  • Local-first operation: audio recognition runs on the user's machine after the required model files are installed.

Tech Stack

  • Tauri 2
  • Rust 2021
  • React 18
  • TypeScript
  • Vite

Requirements

  • Windows 10 or later.
  • Node.js 20 or later.
  • Rust stable toolchain with the x86_64-pc-windows-msvc target.
  • Microsoft Visual Studio Build Tools or Visual Studio with the C++ desktop workload.
  • Git.

The application expects local ASR model files under models/. These files are large and are intentionally not included in the repository.

Setup

Install JavaScript dependencies:

npm install

Install the sherpa-onnx streaming ASR model:

.\scripts\download-asr-model.ps1

Install the Vosk Windows runtime:

.\scripts\install-vosk-runtime.ps1

For Vosk recognition, also place a Vosk model directory under:

models/vosk/model/

For example, after downloading and extracting a compatible Vosk model, the final layout can be:

models/vosk/model/vosk-model-small-cn-0.22/
models/vosk/lib/libvosk.dll
models/vosk/lib/libvosk.lib

Development

Start the Tauri development app:

npm run tauri:dev

Run the frontend type check and production web build:

npm run build

Run Rust checks and tests:

cargo test --manifest-path src-tauri\Cargo.toml

Production Build

Build the desktop app:

npm run tauri:build

Generated installers, executables, debug symbols, downloaded models, and local logs are ignored by git.

Repository Layout

src/                 React application
src-tauri/           Tauri/Rust desktop backend
scripts/             Helper scripts for local ASR assets
samples/             Sample script content

Notes on Speech Assets

The source code is open, but speech models and native ASR runtime binaries are not vendored in this repository because of size and upstream licensing considerations. Use the scripts and upstream model/runtime distributions to populate models/ locally.

License

This project is licensed under the MIT License. See LICENSE.

About

Windows voice-assisted teleprompter built with Tauri, React, and local ASR.

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages