시작
설치 단계와 이 플러그인에 대한 전체 마크다운 가이드가 포함된 설정 프롬프트를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-speech-recognition`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/speech-recognition/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 제목bun add @capgo/capacitor-speech-recognitionbunx cap sync수입
수입 제목import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';API 개요
API 개요 제목available
사용 가능한 섹션현재 기기의 네이티브 음성 인식 서비스가 사용 가능한지 확인합니다.
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.available();isOnDeviceRecognitionAvailable
사용 가능한 섹션: isOnDeviceRecognitionAvailable선택한 지역에 대해 플랫폼의 최신 기기 내 인식 경로가 사용 가능한지 확인합니다.
이 기능을 사용하기 전에 이 기능 체크를 사용해야 합니다. useOnDeviceRecognition.
A true 결과는 현재 기기, OS 버전 및 지역이 최신 기기 내 경로를 사용할 수 있는지 여부를 나타냅니다.
기기에서만 레거시 인식기 경로를 지원할 때 반환됩니다. false 플랫폼 __CAPGO_KEEP_0__ 문서:
Platform SDK docs: iOS: 음성 안드로이드: 음성 인식기
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.isOnDeviceRecognitionAvailable();start
시작음성 녹음과 인식을 시작합니다.
언제 partialResults 는 true, 반환된 promise는 즉시 해결되고 업데이트는 partialResults listener
까지 세션 종료까지 스트리밍됩니다. useOnDeviceRecognition: true 기본 경로는 백워드 호환성을 위해 레거시 인식기 동작을 유지합니다.
만약
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.start();‘하세요’ 총주세요 총고세요 세요.
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.stop();forceStop
Section titled “forceStop”‘하세요’ 총주세요 총고세요 세요 총세요 총고세요 세요.
On Android, this first tries a normal stop and then falls back to destroy/recreate after timeout.
On iOS, the current session is stopped immediately.
If a partial transcript is cached, it is emitted through the partialResults listener with forced: true.
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.forceStop();getLastPartialResult
Section titled “getLastPartialResult”‘하세요’ 총주세요 총고세요 세요 총세요 총고세요 세요 총세요 총고세요 세요.
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.getLastPartialResult();setPTTState
__CAPGO_KEEP_1____CAPGO_KEEP_2__
__CAPGO_KEEP_3__ continuousPTT __CAPGO_KEEP_4__
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.setPTTState({} as PTTStateOptions);getSupportedLanguages
__CAPGO_KEEP_6____CAPGO_KEEP_7__
__CAPGO_KEEP_8__ languages __CAPGO_KEEP_9__
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.getSupportedLanguages();isListening
__CAPGO_KEEP_11____CAPGO_KEEP_0__이 활성 상태로 음성 인식을 기다리고 있는지 여부를 반환합니다.
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.isListening();checkPermissions
__CAPGO_KEEP_0__ 섹션__CAPGO_KEEP_0__의 현재 권한 상태를 가져옵니다.
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.checkPermissions();requestPermissions
__CAPGO_KEEP_0__ 섹션__CAPGO_KEEP_0__를 클립보드에 복사합니다.
import { SpeechRecognition } from '@capgo/capacitor-speech-recognition';
await SpeechRecognition.requestPermissions();__CAPGO_KEEP_0__ 섹션
__CAPGO_KEEP_0__ 섹션SpeechRecognitionAvailability
__CAPGO_KEEP_0__를 클립보드에 복사합니다.export interface SpeechRecognitionAvailability { available: boolean;}SpeechRecognitionStartOptions
SpeechRecognitionStartOptionsSpeechRecognitionStartOptions를 구성하는 방법
export interface SpeechRecognitionStartOptions { /** * Locale identifier such as `en-US`. When omitted the device language is used. */ language?: string; /** * Maximum number of final matches returned by native APIs. Defaults to `5`. */ maxResults?: number; /** * Prompt message shown inside the Android system dialog (ignored on iOS). */ prompt?: string; /** * When `true`, Android shows the OS speech dialog instead of running inline recognition. * Defaults to `false`. */ popup?: boolean; /** * Emits partial transcription updates through the `partialResults` listener while audio is captured. */ partialResults?: boolean; /** * Enables native punctuation handling where supported (iOS 16+). */ addPunctuation?: boolean; /** * Opt in to the platform's newer on-device recognition path when available. * * On iOS 26+, this uses Apple's `SpeechAnalyzer` / `SpeechTranscriber` pipeline. * On recent Android versions, this uses the on-device `SpeechRecognizer` path. * * It is intentionally opt-in so existing apps keep the legacy flow unless they choose * to roll out the new behavior. * * Use {@link SpeechRecognitionPlugin.isOnDeviceRecognitionAvailable} before enabling it in production. * * Platform SDK docs: * iOS: [Speech](https://developer.apple.com/documentation/speech), * [SpeechAnalyzer](https://developer.apple.com/documentation/speech/speechanalyzer), * [SpeechTranscriber](https://developer.apple.com/documentation/speech/speechtranscriber) * Android: [SpeechRecognizer](https://developer.android.com/reference/android/speech/SpeechRecognizer) * * Defaults to `false`. */ useOnDeviceRecognition?: boolean; /** * Allow a number of milliseconds of silence before splitting the recognition session into segments. * Required to be greater than zero and currently supported on Android only. */ allowForSilence?: number; /** * EXPERIMENTAL: Keep a PTT session alive across silence by restarting recognition while the button stays held. * * This restart behavior is implemented for Android inline recognition and iOS native recognition. */ continuousPTT?: boolean;}SpeechRecognitionMatches
SpeechRecognitionMatchesexport interface SpeechRecognitionMatches { matches?: string[];}ForceStopOptions
ForceStopOptionsForceStopOptions
export interface ForceStopOptions { /** * Android only: timeout in milliseconds before forcing stop via destroy/recreate. * * On iOS, the current session is stopped immediately and this value is ignored. * * Defaults to `1500`. */ timeout?: number;}LastPartialResult
LastPartialResultLastPartialResult
export interface LastPartialResult { /** * Whether a partial result is currently cached. */ available: boolean; /** * The most recent transcript text known to the native recognizer. */ text: string; /** * All current match alternatives when available. */ matches?: string[];}PTTStateOptions
PTTStateOptions__CAPGO_KEEP_0__ 옵션
export interface PTTStateOptions { /** * Whether the PTT button is currently held. */ held: boolean;}SpeechRecognitionLanguages
__CAPGO_KEEP_1__ 제목: 언어 지원export interface SpeechRecognitionLanguages { languages: string[];}SpeechRecognitionListening
__CAPGO_KEEP_1__ 제목: 음성 인식 듣기export interface SpeechRecognitionListening { listening: boolean;}SpeechRecognitionPermissionStatus
__CAPGO_KEEP_1__ 제목: 음성 인식 권한 상태__CAPGO_KEEP_2__에 의해 반환되는 권한 맵 checkPermissions 및 requestPermissions.
export interface SpeechRecognitionPermissionStatus { speechRecognition: PermissionState;}SpeechRecognitionSegmentResultEvent
__CAPGO_KEEP_1__ 제목: 음성 인식 결과 세그먼트 이벤트__CAPGO_KEEP_2__에서만 발생하는 segmented 결과가 생성될 때마다 발생합니다.
export interface SpeechRecognitionSegmentResultEvent { matches: string[];}SpeechRecognitionPartialResultEvent
음성 인식 부분 결과 이벤트부분 음성 인식이 생성될 때마다 발생합니다.
export interface SpeechRecognitionPartialResultEvent { /** * Current recognition matches when the native recognizer reports them. * * This can be omitted for forced or accumulated-only payloads. */ matches?: string[]; /** * Accumulated transcription from earlier continuous PTT cycles. */ accumulated?: string; /** * Final accumulated text including the current result. */ accumulatedText?: string; /** * `true` when the plugin is restarting recognition inside a continuous PTT session. */ isRestarting?: boolean; /** * `true` when the payload was emitted by `forceStop()`. */ forced?: boolean;}SpeechRecognitionListeningEvent
음성 인식 듣기 이벤트듣기 상태가 변경될 때 발생합니다.
export interface SpeechRecognitionListeningEvent { /** * Finite state of the recognition session. */ state?: ListeningFiniteState; /** * Unique identifier for the current listening session. */ sessionId?: number; /** * Why this state transition occurred. */ reason?: ListeningReason; /** * Error code when the transition is caused by an error. */ errorCode?: string; /** * Backward-compatible binary state used by earlier releases. */ status?: 'started' | 'stopped';}진실의 근원
진실의 근원이 페이지는 플러그인의 src/definitions.ts업스트림에서 API이 변경될 때 다시 싱크를 실행하세요.
시작부터 계속하세요
시작부터 계속하기Capgo를 사용 중이라면 Getting Started 대시보드와 API 연산을 계획하는 경우, API을 연결하세요. Capgo를 사용하여 @capgo/capacitor-speech-recognition을 사용 Capgo를 사용하여 @capgo/capacitor-speech-recognition의 원시 기능을 사용 API 개요 API 개요의 구현 세부 정보 소개 소개의 구현 세부 정보 API 키 API 키의 구현 세부 정보 __CAPGO_KEEP_0__ __CAPGO_KEEP_1__