Repository navigation
Add audio session management and playback functionality to Deepgram module - #21
Merged
Merged
Conversation
…odule - Implemented audio session lifecycle management in Deepgram+AudioSession, including activation, deactivation, and configuration for recording and playback. - Added handling for audio route changes, media services resets, and audio interruptions to ensure seamless audio experience. - Introduced Deepgram+Playback for TTS and voice agent audio output using AVAudioPlayerNode, with support for echo cancellation when voice processing is enabled. - Created Deepgram+Recording to manage microphone capture, supporting both AudioQueue and AVAudioEngine paths for different use cases. - Enhanced private interface in Deepgram+Private.h to manage shared state across audio session, recording, and playback functionalities. - Added error handling and logging throughout the audio management process to aid in debugging and ensure reliability.
…t and permission handling
- Bump version in package.json to 2.2.0. - Add new constants for agent URL and improve base URL handling. - Enhance `configure` function to accept base URL, WebSocket URL, and agent URL overrides. - Introduce reconnect options for live streaming sockets in shared types. - Update speech-to-text hook to support reconnect options and manage socket state. - Implement pause and resume functionality for streaming in speech-to-text hook. - Refactor text intelligence and text-to-speech hooks to use dynamic base URLs. - Add reconnect logic to voice agent hook for improved resilience. - Introduce mute/unmute functionality in voice agent hook with keep-alive support.
…to-speech functionality - Implemented audio-level metering in the iOS native module, allowing for real-time RMS amplitude feedback during microphone capture. - Added `setMeteringEnabled` method to enable/disable audio-level events with configurable intervals. - Enhanced the `useDeepgramSpeechToText` hook to support audio-level tracking, including state management for audio levels. - Introduced `synthesizeToBytes` method in the text-to-speech hook to fetch synthesized audio as raw bytes, with caching for repeated requests. - Updated UI components to display audio byte information and integrate new functionalities. - Refactored authentication handling to support token-based authentication, allowing for more secure API key management.
…nd improve authentication token management
- Implemented recording to WAV file while streaming audio to Deepgram. - Added methods for starting, stopping, and discarding recordings. - Introduced audio route management with methods to set and get the preferred audio output route. - Enhanced error handling with a structured DeepgramError class for better error management across the application. - Updated TypeScript types to support new recording and audio route features. - Added event listener for audio route changes to notify JavaScript side of changes.
- Implemented `getAudioDevices` method to enumerate available audio output devices, including Bluetooth headsets and built-in options. - Added `selectAudioDevice` method to allow users to select a specific audio device by its ID. - Enhanced the Android and iOS native modules to support audio device management. - Updated React Native interface to expose new methods for audio device handling. - Introduced event listeners for audio device changes, allowing real-time updates in the UI. - Updated permissions for Bluetooth access on Android 12+.
- Removed audio route management methods and properties from iOS implementation, including `setAudioRoute`, `getAudioRoute`, and `selectAudioDevice`. - Eliminated related properties in `Deepgram+Private.h` and `Deepgram+AudioSession` files. - Updated `Deepgram.mm` to remove audio route methods and their exports. - Cleaned up Android permissions related to Bluetooth routing in the plugin configuration. - Deleted `audioRoute.ts` as it contained methods for managing audio routes that are no longer supported. - Adjusted TypeScript interfaces and exports to reflect the removal of audio route functionalities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement audio session lifecycle management, enhance playback and recording capabilities, and improve error handling. Introduce new features for audio device management and update configuration options for better resilience and flexibility. Version updated to 2.2.0.