npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-voice-studio

v0.3.2

Published

React Native module for audio recording

Readme

🎙️ React Native Voice Studio

A lightweight React Native TurboModule for handling audio recording with native performance.


✨ Features

  • Start and stop audio recording
  • Saves recording to place of your choice in documents
  • Native TurboModule
  • Simple API surface
  • Handles permission & system settings redirection

📦 Installation

npm install react-native-voice-studio
# or
yarn add react-native-voice-studio

Then install pods (iOS):

cd ios && pod install

⚙️ Android Setup (IMPORTANT)

You must register the activity launcher in your MainActivity.

Step 1: Open MainActivity.kt

import android.os.Bundle; 
import com.voicestudio.VoiceStudioModuleImpl
...
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    VoiceStudioModuleImpl.registerActivityLauncher(this)
}

💡 Why is this required?

The module needs access to the current Activity to:

  • Launch system UI flows (e.g. permissions, document picker)
  • Handle results from Android activity-based APIs

Without this:

  • Permission flows may fail ❌
  • Document picker may not work ❌
  • You may encounter unexpected crashes ❌

🍎 iOS Setup (Audio Recording)

To enable audio recording on iOS, you need to configure permissions and audio session properly.


Step 1: Add Microphone Permission

Open your Info.plist and add:

<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to your microphone to record audio.</string>

💡 Why is this required?

iOS enforces strict privacy rules. Without this key:

  • The app will crash immediately when trying to access the microphone ❌
  • The permission dialog will not appear ❌

⚠️ Important Notes

  • If the user denies permission permanently:
    • You must guide them to Settings
    • openSettings() method will handle this

📘 API

Methods

startRecording()

startRecording(): Promise<void>

Starts audio recording.

  • Requests permission if needed
  • Throws error if permission is denied

stopRecording()

stopRecording(): void

Stops the current recording session.


openSettings()

openSettings(): void

Opens the app settings page.


🚨 Errors

export enum VoiceStudioError {
  PERMISSION_DENIED = 'PERMISSION_DENIED',
  UNEXPECTED_ERROR = 'UNEXPECTED_ERROR',
}

Error Handling Example

import VoiceStudio, { VoiceStudioError } from 'react-native-voice-studio';

try {
  await VoiceStudio.startRecording();
} catch (e) {
  if (e === VoiceStudioError.PERMISSION_DENIED) {
    VoiceStudio.openSettings();
    console.log('Permission denied');
  }
}

🧠 Usage Example

import VoiceStudio from 'react-native-voice-studio';

const start = async () => {
  try {
    await VoiceStudio.startRecording();
    console.log('Recording started');
  } catch (e) {
    console.error(e);
  }
};

const stop = () => {
  VoiceStudio.stopRecording();
  console.log('Recording stopped');
};

🔐 Permissions

Android

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

📱 Demos

🤖 Android

https://github.com/user-attachments/assets/9fadd5e4-fa1a-4144-9930-7d63db37d857

🍎 iOS

https://github.com/user-attachments/assets/9f037ee0-5b33-49de-8e7c-64dae7818040


🐛 Troubleshooting

Recording doesn’t start

  • Check microphone permission
  • Ensure registerActivityLauncher is added (Android)

App crashes on startRecording

  • Missing permission keys (Android/iOS)
  • Module not linked properly

📄 License

MIT