A complete BLE audio streaming and transcription system using the Seeed Studio XIAO nRF52840 Sense board with real-time speech-to-text capabilities.
- Real-time Audio Capture - 16kHz microphone streaming via BLE
- Custom BLE Audio Service - Optimized for continuous audio streaming
- Professional Audio Quality - 16-bit PCM, mono channel
- Continuous Streaming - 160 samples per packet, 10ms intervals
- Comprehensive Debugging - Detailed serial output and monitoring
- BLE Audio Recording - Capture audio directly from XIAO board
- Live Transcription - Real-time speech-to-text using Deepgram
- Audio Playback - Play recorded audio with proper audio context
- Modern UI - Beautiful, responsive interface with real-time status
- Cross-platform - Works on desktop and mobile browsers
- Seeed Studio XIAO nRF52840 Sense board
- USB-C cable for programming and power
- Computer with Bluetooth capability
- Web browser with Web Bluetooth support (Chrome/Edge recommended)
- Nordic Connect SDK v3.1.1 or compatible
- nRF Command Line Tools
- VS Code with nRF Connect extension (recommended)
- Node.js (v14 or higher)
- npm package manager
- Modern web browser with Web Bluetooth support
βββ src/ # Firmware source code
β βββ main.c # Main application and BLE setup
β βββ custom_audio_service.c # Audio streaming service
β βββ custom_audio_service.h # Service definitions
βββ reactapp/ # React web application
β βββ src/
β β βββ App.js # Main React component
β β βββ components/
β β βββ BLEConnection.js # BLE connection management
β β βββ AudioRecorder.js # Audio recording functionality
β β βββ DeepgramTranscriber.js # Speech-to-text integration
β βββ public/
β βββ package.json # Dependencies
β βββ README.md # React app documentation
βββ CMakeLists.txt # Firmware build configuration
βββ prj.conf # Project configuration
βββ README.md # This file
# Build the firmware
west build -b xiao_ble/nrf52840/sense
# Flash via UF2 bootloader
# 1. Double-click reset button on XIAO board
# 2. Copy build/zephyr/zephyr.uf2 to XIAO-SENSE drive# Navigate to React app directory
cd reactapp
# Install dependencies
npm install
# Start development server
npm start- Open browser to
http://localhost:3000 - Connect to XIAO board - Click "Connect to XIAO Board"
- Start Recording - Click "Start Recording" and speak into XIAO
- Live Transcription - Click "Start Transcription" for real-time speech-to-text
- Playback - Play recorded audio or download as WAV file
- Audio Format: 16-bit PCM, 16kHz sample rate, mono
- BLE Streaming: 160 samples per packet (320 bytes), 10ms intervals
- Device Name: "MicStreamer"
- Service UUID:
12345678-1234-5678-1234-567812345678 - Characteristic UUID:
12345679-1234-5678-1234-567812345678
- Web Bluetooth API - Direct BLE communication
- Audio Context - Professional audio processing
- Deepgram Integration - Live speech-to-text transcription
- Real-time Status - Stream monitoring and packet counting
- Cross-browser Support - Works on Chrome, Edge, and other modern browsers
XIAO Microphone β BLE Stream β React App β Deepgram API β Live Transcription
β
Audio Recording β WAV File β Playback/Download
| Browser | Web Bluetooth | Audio Context | Status |
|---|---|---|---|
| Chrome | β Yes | β Yes | β Full Support |
| Edge | β Yes | β Yes | β Full Support |
| Safari | β No | β Yes | |
| Firefox | β No | β Yes |
Connect to serial at 115200 baud:
screen /dev/cu.usbmodem1101 115200- F12 β Console tab
- Look for BLE connection logs
- Monitor audio packet reception
- Check transcription status
π€ XIAO MIC (BLE): received 160 samples
π΅ Transcribing XIAO MIC: sent 160 samples to Deepgram
π Deepgram transcript received: "Hello world"
Update the API key in reactapp/src/components/DeepgramTranscriber.js:
const DEEPGRAM_API_KEY = 'your-api-key-here';- Sample Rate: 16kHz (matches firmware)
- Channels: 1 (mono)
- Bit Depth: 16-bit
- Encoding: linear16 (for Deepgram)
- Ensure XIAO board is powered and running firmware
- Check browser has Bluetooth permissions
- Try refreshing the page and reconnecting
- Verify "MicStreamer" appears in device list
- Check serial output for streaming status
- Verify audio stream is active in React app
- Ensure XIAO microphone is not blocked
- Test with different audio levels
- Verify Deepgram API key is correct
- Check network connection
- Monitor browser console for errors
- Ensure audio packets are being sent to Deepgram
- Service UUID:
12345678-1234-5678-1234-567812345678 - Audio Data Characteristic:
12345679-1234-5678-1234-567812345678 - Properties: Notify, Write
- Model: nova-3 (latest)
- Language: en-US
- Format: linear16
- Sample Rate: 16000 Hz
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source. Feel free to modify and distribute according to your needs.
- Seeed Studio for the excellent XIAO nRF52840 Sense board
- Nordic Semiconductor for the nRF Connect SDK
- Deepgram for the speech-to-text API
- React and Web Bluetooth communities
π€ XIAO Audio Transcriber
Real-time BLE audio streaming with live speech-to-text transcription
Built with β€οΈ for the XIAO nRF52840 Sense community