Spaces:
Sleeping
Sleeping
File size: 2,440 Bytes
4320d5e 7428077 fcb58c1 7428077 4320d5e 5913e3c 7428077 4320d5e 7428077 2b9ba40 7428077 a7a25f4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
---
title: English Dialect Classifier
emoji: π
colorFrom: red
colorTo: red
sdk: streamlit
app_file: app.py
app_port: 8501
tags:
- streamlit
pinned: false
short_description: Predicting English Dialect Using Speech Brain and Streamlit
license: apache-2.0
---
# Welcome to Streamlit!
Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
forums](https://discuss.streamlit.io).
π€ English Accent Analyzer
Streamlit App
PyTorch
A tool to identify English accents from audio/video sources with optimized processing for large files.
π Features
Supports local files, direct media URLs, and Loom videos
Automatically splits large files into 1-minute chunks
Early stopping for faster analysis
Confidence-based predictions
Interactive Streamlit dashboard
βοΈ Installation
Clone the repository:
bash
git clone https://github.com/your-username/accent-analyzer.git
cd accent-analyzer
Install dependencies:
bash
pip install -r requirements.txt
Install FFmpeg (required for audio processing):
bash
# On Ubuntu/Debian
sudo apt install ffmpeg
# On macOS
brew install ffmpeg
π₯οΈ Usage
Run the Streamlit app:
bash
streamlit run app.py
The app will open in your browser at http://localhost:8501
π₯ Input Options
1. Upload a file
Supported formats:
Video: .mp4, .webm, .avi, .mov, .mkv, .m4v
Audio: .mp3, .wav, .m4a, .aac, .ogg, .flac
2. Provide a URL
Loom videos: https://www.loom.com/share/...
Direct media links: https://example.com/video.mp4
π§ Optimizations for Large Files
The system automatically handles large files using these techniques:
Diagram
Code
Chunk Processing:
Audio is split into 1-minute segments
Only segments >10 seconds are processed
Enables parallel processing (future implementation)
Early Stopping:
Stops processing when 3 consecutive chunks agree with high confidence
Saves processing time for long files
Efficient Extraction:
Uses FFmpeg for fast audio extraction
Torchaudio fallback for compatibility
Direct streaming for URL sources
Confidence Threshold:
Only predictions >60% confidence are considered
Reduces false positives from noisy segments
π Example Output
Example Dashboard
The dashboard shows:
Predicted accent with confidence percentage
Confidence scores per minute
Accent distribution charts
Processing time metrics |