Getting Started
설치 단계 및 이 플러그인의 전체 마크다운 가이드가 포함된 설정 프롬프트를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-audio-recorder`
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/audio-recorder/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.
설치
설치란 제목Capgo AI 도구에 다음 명령어를 사용하여 플러그인을 설치할 수 있습니다.
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins그런 다음 다음 프롬프트를 사용하세요.
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-audio-recorder` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래에 플랫폼에 따라 설명된 지침을 따르세요.
bun add @capgo/capacitor-audio-recorderbunx cap syncImport
Import란 제목import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';API 개요
API 개요 제목startRecording
__CAPGO_KEEP_0__ 시작__CAPGO_KEEP_0__ 장치 마이크를 사용하여 음성을 녹음합니다.
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.startRecording();pauseRecording
__CAPGO_KEEP_0__ 제목 "녹음 중단"Pause the ongoing recording. Only available on Android (API 24+), iOS, and Web.
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.pauseRecording();resumeRecording
__CAPGO_KEEP_0__ 제목 "녹음 재개",
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.resumeRecording();stopRecording
__CAPGO_KEEP_0__ 제목 "녹음 중지"현재 녹음 중지하고 녹음된 오디오를 영구 저장합니다.
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.stopRecording();cancelRecording
취소 녹음현재 녹음 중지하고 캡처된 오디오를 폐기합니다.
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.cancelRecording();getRecordingStatus
녹음 상태 가져오기현재 녹음 상태를 가져옵니다.
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.getRecordingStatus();getCurrentAmplitude
현재 진폭 가져오기마이크 수준을 나타내는 정규화된 숫자를 반환합니다. [0, 1] 녹음 중에 실시간 시각화를 위한 VU 미터 또는 파형과 같은 시각화를 구동하기 위해 사용됩니다.
Returns 0 __CAPGO_KEEP_0__. Designed for
UI-rate polling — 60–100 ms interval이 좋은 시작점입니다. tight loop에서 호출하지 마십시오; 각 호출은 JS/native bridge를 건너갑니다.
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.getCurrentAmplitude();checkPermissions
__CAPGO_KEEP_1__마이크로폰에 접근하기 위한 현재 권한 상태를 반환합니다.
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.checkPermissions();requestPermissions
__CAPGO_KEEP_1__마이크로폰에 접근하기 위한 권한을 요청합니다.
import { CapacitorAudioRecorder } from '@capgo/capacitor-audio-recorder';
await CapacitorAudioRecorder.requestPermissions();__CAPGO_KEEP_2__
__CAPGO_KEEP_3__StartRecordingOptions
__CAPGO_KEEP_3____CAPGO_KEEP_4__
export interface StartRecordingOptions { /** * The audio session category options for recording. Only available on iOS. * * @since 1.0.0 */ audioSessionCategoryOptions?: AudioSessionCategoryOption[];
/** * The audio session mode for recording. Only available on iOS. * * @since 1.0.0 */ audioSessionMode?: AudioSessionMode;
/** * The audio bit rate in bytes per second. * Only available on Android and iOS. * * @since 1.0.0 */ bitRate?: number;
/** * The audio sample rate in Hz. * Only available on Android and iOS. * * @since 1.0.0 */ sampleRate?: number;}StopRecordingResult
녹음 중지 결과.으로부터 반환되는 결과
export interface StopRecordingResult { /** * The recorded audio as a Blob. Only available on Web. * * @since 1.0.0 */ blob?: Blob;
/** * The duration of the recording in milliseconds. * * @since 1.0.0 */ duration?: number;
/** * The URI pointing to the recorded file. Only available on Android and iOS. * * @since 1.0.0 */ uri?: string;}GetRecordingStatusResult
녹음 상태 가져오기 결과.으로부터 반환되는 결과
export interface GetRecordingStatusResult { /** * The current recording status. * * @since 1.0.0 */ status: RecordingStatus;}GetCurrentAmplitudeResult
현재 진폭 결과.으로부터 반환되는 결과
export interface GetCurrentAmplitudeResult { /** * The current input amplitude normalized to the `[0, 1]` range, where `0` * represents silence and `1` represents the maximum level the platform can * report. The value is `0` when no recording is active. * * Note: the source signal differs between platforms — Android reports the * peak sample amplitude since the last call, iOS reports the average power * in dB converted to linear, and Web reports the RMS of the latest frame. * Consumers that need cross-platform parity may want to apply a * per-platform scaling curve. * * @since 8.1.0 */ value: number;}PermissionStatus
권한 상태.과 .으로부터 반환되는 권한 정보
export interface PermissionStatus { /** * The permission state for audio recording. * * @since 1.0.0 */ recordAudio: PermissionState;}RecordingErrorEvent
__CAPGO_KEEP_1____CAPGO_KEEP_2__
export interface RecordingErrorEvent { /** * The error message. * * @since 1.0.0 */ message: string;}RecordingStoppedEvent
__CAPGO_KEEP_1____CAPGO_KEEP_3__
export type RecordingStoppedEvent = StopRecordingResult;AudioSessionCategoryOption
__CAPGO_KEEP_4____CAPGO_KEEP_5__
export enum AudioSessionCategoryOption { AllowAirPlay = 'ALLOW_AIR_PLAY', AllowBluetooth = 'ALLOW_BLUETOOTH', AllowBluetoothA2DP = 'ALLOW_BLUETOOTH_A2DP', DefaultToSpeaker = 'DEFAULT_TO_SPEAKER', DuckOthers = 'DUCK_OTHERS', InterruptSpokenAudioAndMixWithOthers = 'INTERRUPT_SPOKEN_AUDIO_AND_MIX_WITH_OTHERS', MixWithOthers = 'MIX_WITH_OTHERS', OverrideMutedMicrophoneInterruption = 'OVERRIDE_MUTED_MICROPHONE_INTERRUPTION',}AudioSessionMode
__CAPGO_KEEP_0____CAPGO_KEEP_7__
export enum AudioSessionMode { Default = 'DEFAULT', GameChat = 'GAME_CHAT', Measurement = 'MEASUREMENT', SpokenAudio = 'SPOKEN_AUDIO', VideoChat = 'VIDEO_CHAT', VideoRecording = 'VIDEO_RECORDING', VoiceChat = 'VOICE_CHAT',}RecordingStatus
기록 상태를 기록하는 섹션기록 상태입니다.
export enum RecordingStatus { Inactive = 'INACTIVE', Recording = 'RECORDING', Paused = 'PAUSED',}PermissionState
권한 상태를 기록하는 섹션Capacitor에서 지원하는 플랫폼 권한 상태입니다.
export type PermissionState = 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied';진실의 근원
진실의 근원 섹션이 페이지는 플러그인의 src/definitions.tsAPI의 공개 버전이 업스트림에서 변경되면 다시 싱크를 실행하세요.
Getting Started에서 계속 진행하세요
Getting Started에서 계속하기__CAPGO_KEEP_0__에서 __CAPGO_KEEP_1__-audio-recorder를 사용 중이라면 Getting Started __CAPGO_KEEP_0__에서 __CAPGO_KEEP_1__-audio-recorder와 연결하세요 capgo에서 capacitor-audio-recorder의 native 기능을 사용하기 위해 capgo에서 capacitor-live-activities를 사용 중이라면 capgo에서 capacitor-live-activities와 연결하세요 capgo에서 capacitor-live-activities의 native 기능을 사용하기 위해 capgo/capacitor-live-activities capgo에서 capacitor-live-activities의 구현 세부 정보를 위해 capgo에서 capacitor-video-player를 사용 중이라면 capgo에서 capacitor-video-player와 연결하세요 @capgo/capacitor-video-player capgo/capacitor-비디오 플레이어 구현 세부 사항입니다.