record-audio
Helper for integrating audio recording functionality into Flutter projects.
Install
mkdir -p .claude/skills/record-audio && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15674" && unzip -o skill.zip -d .claude/skills/record-audio && rm skill.zipInstalls to .claude/skills/record-audio
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use this skill when the user asks how to add the record package to a Flutter project and use it to record audio.Key capabilities
- →Add the 'record' package dependency to a Flutter project
- →Initialize an AudioRecorder object
- →Request user permission for microphone access
- →Create a recording configuration with specified settings
- →Start recording audio to a file path
How it works
The skill guides the user through steps to add the 'record' package, initialize an AudioRecorder, configure permissions and settings, and start/stop recording.
Inputs & outputs
When to use record-audio
- →Add voice recording to a mobile app
- →Configure microphone permissions for Flutter
- →Implement custom audio encoding settings
- →Manage file output for recorded audio
About this skill
Record Audio with record Package
Goal
To successfully add the record package to a project and implement functionality to record audio to a file.
Instructions
When tasked with implementing audio recording using the record package, follow these steps:
-
Add the Package Dependency: Add
recordto the project's dependencies:flutter pub add record -
Initialize an AudioRecorder: Instantiate the primary object that controls the recording process. You typically want to hold onto a single instance of
AudioRecorder.import 'package:record/record.dart'; final recorder = AudioRecorder(); -
Request User Permission: Before recording, you must verify that the user has granted microphone permissions. Keep in mind that you may also need to configure platform-specific permissions (like
Info.pliston iOS/macOS orAndroidManifest.xmlon Android).if (await recorder.hasPermission()) { // Permission granted, proceed with recording. } else { // Permission denied, handle accordingly. } -
Create a Recording Configuration: Create a
RecordConfigobject to specify the recording settings such as the encoder, sample rate, and channels. You can also enable features like auto gain, echo cancellation, and noise suppression.final recordConfig = const RecordConfig( encoder: AudioEncoder.pcm16bits, sampleRate: 24000, numChannels: 1, autoGain: true, echoCancel: true, noiseSuppress: true, ); -
Start Recording to a File: Call the
startmethod on theAudioRecorder, providing the configuration and the destination file path.// Provide a valid path for the audio file depending on the platform. final audioFilePath = 'myRecording.wav'; await recorder.start(recordConfig, path: audioFilePath); -
Control an Ongoing Recording (Optional): You can pause and resume the recording if needed.
await recorder.pause(); await recorder.resume(); -
Stop Recording: To stop the recording and retrieve the final path of the saved file, call the asynchronous
stopmethod.final path = await recorder.stop(); print('Recording stopped. File saved to: $path'); -
Dispose of the Recorder: When you are completely finished using the
AudioRecorder(for instance, in thedisposemethod of aStatefulWidget), you must release its resources to prevent memory leaks or microphone locking.await recorder.dispose();
Constraints
- Ensure proper permission checks (
hasPermission()) are performed before attempting to start a recording. - Always
dispose()of theAudioRecorderinstance when it is no longer needed.
When not to use it
- →When the task is not related to adding the 'record' package to a Flutter project
- →When the user does not want to record audio
Limitations
- →Ensure proper permission checks (`hasPermission()`) are performed before attempting to start a recording
- →Always `dispose()` of the `AudioRecorder` instance when it is no longer needed
How it compares
This skill provides a structured, step-by-step guide for implementing audio recording in Flutter using a specific package, rather than general programming advice.
Compared to similar skills
record-audio side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| record-audio (this skill) | 0 | 5mo | Review | Beginner |
| flutter-development | 1,555 | 5mo | No flags | Intermediate |
| flutter-expert | 73 | 4mo | No flags | Advanced |
| mobile-games | 11 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
flutter-expert
sickn33
Master Flutter development with Dart 3, advanced widgets, and multi-platform deployment. Handles state management, animations, testing, and performance optimization for mobile, web, desktop, and embedded platforms. Use PROACTIVELY for Flutter architecture, UI implementation, or cross-platform features.
mobile-games
davila7
Mobile game development principles. Touch input, battery, performance, app stores.
flutter
alinaqi
Flutter development with Riverpod state management, Freezed, go_router, and mocktail testing
mobile-developer
sickn33
Develop React Native, Flutter, or native mobile apps with modern architecture patterns. Masters cross-platform development, native integrations, offline sync, and app store optimization. Use PROACTIVELY for mobile features, cross-platform code, or app optimization.
webf-native-plugin-dev
openwebf
Develop custom WebF native plugins based on Flutter packages. Create reusable plugins that wrap Flutter/platform capabilities as JavaScript APIs. Use when building plugins for native features like camera, payments, sensors, file access, or wrapping existing Flutter packages.