Multiple Audio Formats
Support for MP3, WAV, AAC, M4A, OGG, Opus, FLAC and more
Rich Metadata
Automatic duration, bitrate, and quality information
Overview
Audio posts enable sharing of audio content with automatic metadata extraction and playback support:- Audio Upload: Upload audio files up to 1GB with 1 hour maximum duration
- Metadata Extraction: Automatic extraction of duration, bitrate, sample rate, and channels
- Rich Captions: Text descriptions with mentions and hashtags
- Parent-Child Structure: Each audio file becomes a child post
- Playback Controls: Integrated audio player with standard controls
| Requirement | Limit |
|---|---|
| File Size | Up to 1GB per file |
| Duration | Maximum 1 hour |
| File Formats | MP3, WAV, AAC, M4A, OGG, Opus, FLAC |
| Audio Count | Maximum 10 audio files |
Audio files must be uploaded first before creating the post. See Audio Handling for upload instructions.
Quick Start
1
Upload Audio
Use the File Repository to upload your audio files and get audio data with metadata
2
Create Post
Use the audio data in your post creation request
3
Handle Response
The post will contain parent and child posts for each audio file
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | String | ❌ | Caption text (max 10,000 characters) |
audios/audioFiles | Array | ✅ | Audio data or file IDs from upload |
targetType | Enum | ✅ | Target type (user or community) |
targetId | String | ✅ | Target ID (userId or communityId) |
metadata | Object | ❌ | Custom metadata |
Implementation
Best Practices
Audio Quality
Audio Quality
- Use appropriate bitrates for content type (128-192 kbps for speech, 256-320 kbps for music)
- Choose efficient formats like AAC or Opus for better compression
- Normalize audio levels for consistent playback
- Consider mono for voice content to reduce file size
User Experience
User Experience
- Display audio duration prominently
- Show upload progress with percentage
- Provide audio preview before posting
- Include meaningful captions and descriptions
- Handle playback errors gracefully
- Support background playback where possible
Performance
Performance
- Compress audio before upload to reduce file size
- Implement progress indicators for uploads
- Cache uploaded audio to avoid re-uploads
- Use streaming for playback instead of full download
- Implement retry logic for failed uploads
Troubleshooting
Audio Upload Failures
Audio Upload Failures
Problem: Audio fails to upload or post creation failsSolutions:
- Check file size (must be under 1GB)
- Verify duration (must be under 1 hour)
- Ensure format is supported (MP3, WAV, AAC, etc.)
- Check network connection stability
- Implement retry logic with exponential backoff
Playback Issues
Playback Issues
Problem: Uploaded audio won’t play or has poor qualitySolutions:
- Verify format compatibility with target browsers/players
- Check bitrate isn’t too low (minimum 64 kbps recommended)
- Ensure sample rate is standard (44.1kHz or 48kHz)
- Test audio file before upload
- Use widely supported formats (MP3, AAC)
Metadata Missing
Metadata Missing
Problem: Audio duration or other metadata not displayedSolutions:
- Ensure audio file has valid metadata embedded
- Use standard formats (MP3, AAC) for better metadata support
- Re-encode file with proper metadata if needed
- Verify metadata extraction after upload
Parent-Child Structure: When you upload multiple audio files, the main post becomes the parent, and each audio file creates a child post that users can individually react to and comment on.
Common Use Cases
Podcasts
Share podcast episodes with episode descriptions and show notes
Music Sharing
Share songs, albums, or tracks with artist information
Voice Messages
Quick voice recordings for personal communication
Audio Books
Share narrated content and audiobook chapters
Sound Effects
Share audio samples, beats, and sound effect libraries
Interviews & Discussions
Record and share interview recordings and panel discussions