项目
在 GitHub 查看
anhtuank7c/expo-stt
关于
Speech to text for Expo, with one small API on iOS, Android and web: dictation, voice search, hold to talk and live volume.
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 正在收集历史
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文expo-stt
English | Tiếng Việt
Speech to text for Expo, with one small API that behaves the same on iOS, Android and web.
Documentation with live demos and copyable code →
import { listen } from 'expo-stt';
const { transcript } = await listen({ locale: 'en-US' });
What you see is what you get
Each demo is one file in example/scenes/. The documentation runs that file and prints it: copy it, and you have what you saw.
![]() Voice notes Dictation that survives pauses: it keeps listening until you stop it. |
![]() Voice search One phrase, one await: the result of listen() goes into the search field. |
![]() Hold to talk Hold to speak, release to send, slide left to cancel. |
![]() Voice commands A smart home that tries every alternative until one makes sense. |
![]() Hands-free form Asks one question after the other, with a plain for loop. |
![]() Pronunciation Words light up while you read them, then you get a score. |
Install
npx expo install expo-stt
On iOS it compiles, but speech recognition has not been tested on a device yet.
{ "expo": { "plugins": ["expo-stt"] } }
Expo SDK 58 or newer, in a development build. Not in Expo Go.
Browsers
| Browser | Speech recognition |
|---|---|
| Chrome, Edge | Works right away. Chrome sends the audio to Google |
| Firefox | Asks to download a language pack first, then works |
| Others | getCapabilities().recognition tells. Without it, start() and listen() reject with service-unavailable |
The page needs HTTPS or localhost.
Use
import { useSpeechRecognition } from 'expo-stt';
function Dictation() {
const { transcript, isActive, toggle, error } = useSpeechRecognition({ continuous: true });
return (
<>
<Text>{transcript}</Text>
{error && <Text>{error.code}</Text>}
<Button title={isActive ? 'Stop' : 'Speak'} onPress={() => void toggle()} />
</>
);
}
| You want | Use |
|---|---|
| One phrase | listen() |
| A screen that shows what is said | useSpeechRecognition() |
| A button to hold while talking | useHoldToTalk() |
| A waveform | useSpeechVolume() |
| Full control outside of React | start(), stop(), abort(), addListener() |
API · Platforms · Migrating from 0.x · Architecture · Contributing
License
MIT © Tuan Nguyen Anh
探索相关项目
加载中…





