패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.2

audio_recorder

오디오를 녹음하는 데 사용할 수 있는 플러터 플러그인입니다.

30일 다운로드
1천
좋아요
79
Pub 점수
15

패키지 설치

flutter pub add audio_recorder

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

모바일 애플리케이션에서 오디오 녹음 기능을 활성화하기 위해 설계된 플러터 플러그인입니다. 지원되는 플랫폼에서 오디오 녹음을 시작하고 중지하며 관리할 수 있는 간단한 인터페이스를 제공합니다. 음성 메모, 팟캐스트 제작 또는 음성 기반 상호작용이 필요한 앱에 적합합니다. 플러터 생태계와 원활하게 통합되며 일반적인 오디오 형식을 지원합니다. 개발자는 플러그인이 반환하는 파일 경로를 통해 녹음된 파일에 접근할 수 있습니다.

사용 사례

  • 음성 메모 애플리케이션
  • 팟캐스트 녹음 도구
  • 음성에서 텍스트로의 통합
  • 인터랙티브 음성 기능
  • 오디오 로깅

주요 기능

  • 간단한 시작/정지 녹음 API
  • 기록된 오디오에 대한 파일 경로 반환
  • 크로스 플랫폼 오디오 캡처
  • 일반적인 오디오 형식을 지원합니다
  • Flutter와의 간편한 통합

적합한 대상

  • 모바일 앱 개발자
  • 음성 기능이 있는 애플리케이션
  • 교육 도구
  • 콘텐츠 생성 앱
  • 접근성 기능

고려 사항

  • Android 및 iOS에서 런타임 권한이 필요합니다
  • 기기에서 지원하는 오디오 형식에 제한됨
  • 내장된 오디오 재생 없음
  • 플랫폼별 구성이 필요할 수 있습니다
  • 파일 관리 책임은 개발자에게 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Audio recorder

pub package Build Status Coverage Status

Record audio and store it locally

Usage

To use this plugin, add audio_recorder as a dependency in your pubspec.yaml file.

Android

Make sure you add the following permissions to your Android Manifest

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
iOS

Make sure you add the following key to Info.plist for iOS

<key>NSMicrophoneUsageDescription</key>
<string>Record audio for playback</string>

Example

// Import package
import 'package:audio_recorder/audio_recorder.dart';

// Check permissions before starting
bool hasPermissions = await AudioRecorder.hasPermissions;

// Get the state of the recorder
bool isRecording = await AudioRecorder.isRecording;

// Start recording
await AudioRecorder.start(path: _controller.text, audioOutputFormat: AudioOutputFormat.AAC);

// Stop recording
Recording recording = await AudioRecorder.stop();
print("Path : ${recording.path},  Format : ${recording.audioOutputFormat},  Duration : ${recording.duration},  Extension : ${recording.extension},");

Encoding format

For now, the plugin only use the AAC compression to encode audio. You can specify the extension of the output audio file in the file path that you give to the start method. The recognized extensions are :

  • .m4a
  • .mp4
  • .aac

If the file path does not finish with these extensions, the ".m4a" extension is added by default.

Exceptions

The start method raise an exception if :

  • A file already exists at the given file path
  • The parent directory of the file path does not exist

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

카테고리

의존성

의존성 목록 2 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.