@pilotoo/voice-native
Introduction
Section titled “Introduction”@pilotoo/voice-native runs speech-to-text and text-to-speech in Rust inside a Tauri 2 app. It contains the tauri-plugin-pilotoo-voice crate and its JavaScript side, which exposes a VoiceBackend for @pilotoo/voice. Voice activity detection and the speaker stay in the page. Use it in a desktop app that should transcribe and speak on the device.
Installation
Section titled “Installation”@pilotoo/voice-native is at version 0.1.0 and is not published to a registry. It is also not part of the tarballs that pnpm release:check packs, so today it is used from the kit workspace:
pnpm installpnpm --filter @pilotoo/voice-native buildInside the workspace, depend on it with "@pilotoo/voice-native": "workspace:^". Add the tauri-plugin-pilotoo-voice crate to your Tauri app as well; the speech models are downloaded on demand.
Basic usage
Section titled “Basic usage”import { createNativeVoiceBackend } from '@pilotoo/voice-native';
const backend = await createNativeVoiceBackend({ page });page is the PageVoice your app supplies (see createWebPageVoice in @pilotoo/voice/web). The call asks the plugin for its models first, so it is async.
Entry points
Section titled “Entry points”| Import | Provides |
|---|---|
@pilotoo/voice-native |
The only entry point. createNativeVoiceBackend, nativeSynthesizer, nativeTranscriber, nativeModelStore, loadNativeModels, tauriIpc, composeModelStores. |
Peer dependencies
Section titled “Peer dependencies”@tauri-apps/api^2.12.0
Learn more
Section titled “Learn more”- Voice.
- Local backend: the desktop setup this plugs into.