hume-audio-module
v1.1.18
Published
Audio module for Hume EVI integration
Maintainers
Readme
Hume Audio Module
Audio module for Hume EVI integration in React Native/Expo applications.
Installation
npm install hume-audio-moduleUsage
import AudioModule from 'hume-audio-module';
// Get permissions
await AudioModule.getPermissions();
// Start recording
await AudioModule.startRecording();
// Stop recording
await AudioModule.stopRecording();
// Play audio
await AudioModule.enqueueAudio(base64Audio);
// Stop playback
await AudioModule.stopPlayback();
// Mute/unmute microphone
await AudioModule.mute();
await AudioModule.unmute();Audio Output Control
The module defaults to using the device's speaker for optimal audio experience. You can control audio output routing:
// Set audio output to speaker (default behavior)
await AudioModule.setAudioOutputToSpeaker();
// Set audio output to earpiece
await AudioModule.setAudioOutputToEarpiece();
// Toggle between speaker and earpiece
await AudioModule.toggleAudioOutput();
// Check current audio output mode
const isUsingSpeaker = AudioModule.isUsingBuiltInSpeaker();Default Behavior
- iOS: Audio automatically routes through the device's external speaker
- Web: Audio plays at full volume (simulating speaker output)
- Android: Audio routes through the device's external speaker
The speaker output ensures clear audio playback even in noisy environments and provides the best user experience for voice interactions.
Requirements
- Expo SDK 52 or higher
- React Native 0.72 or higher
- iOS 15.1 or higher
Development Build
This module requires a development build. Run:
npx expo prebuildLicense
MIT
