プロジェクト
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.
Web・アプリ開発計測したスター増加
- 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
関連プロジェクトを探す
読み込み中…





