Prathamesh Sarjerao Vaidya commited on
Commit
5942c3e
·
1 Parent(s): 5da3fbe

made an update

Browse files
.gitignore ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ __pycache__/
2
+ *.py[cod]
3
+ .env
4
+ venv/
5
+ .venv/
6
+
7
+ # Runtime folders created by the app
8
+ uploads/
9
+ outputs/
10
+ model_cache/
11
+ temp_files/
12
+ results/
CITATION.cff ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cff-version: 1.2.0
2
+ message: "If you use this work, please cite it using the metadata below."
3
+ type: software
4
+ title: "Multilingual Audio Intelligence System: Speaker Diarization, Speech Recognition and Translation"
5
+ authors:
6
+ - given-names: "Prathamesh Sarjerao"
7
+ family-names: "Vaidya"
8
+ orcid: "https://orcid.org/0009-0000-8091-4256"
9
+ repository-code: "https://github.com/Prathameshv07/Multilingual-Audio-Intelligence-System"
10
+ license: CC-BY-NC-4.0
11
+ date-released: "2025-09-06"
12
+ abstract: "An end-to-end audio analysis pipeline that combines pyannote.audio speaker diarization, OpenAI Whisper multilingual speech recognition and a three-tier neural machine translation fallback (Opus-MT, Google Translate wrappers, mBART50/M2M-100), with a focus on Indian languages, served through a FastAPI web interface with waveform visualisation and cached demo mode."
13
+ keywords:
14
+ - "speaker diarization"
15
+ - "automatic speech recognition"
16
+ - "machine translation"
17
+ - "Indian languages"
18
+ - "Whisper"
19
+ - "pyannote.audio"
DOCUMENTATION.md CHANGED
@@ -11,7 +11,7 @@ The primary objective of the Multilingual Audio Intelligence System is to provid
11
  - **Language Support**: Support for Tamil, Hindi, Telugu, Gujarati, Kannada, and other regional languages
12
  - **Multi-Tier Translation**: Fallback system ensuring broad translation coverage across language pairs
13
  - Providing precise speaker diarization with high accuracy using pyannote.audio technology
14
- - Delivering multilingual automatic speech recognition supporting 100+ languages through faster-whisper integration
15
  - Generating neural machine translations using Opus-MT, Google API alternatives, and mBART50 models
16
  - **File Management**: Processing strategies for various file sizes with appropriate user guidance
17
  - **CPU Optimization**: Designed for broad compatibility without GPU requirements
@@ -64,7 +64,7 @@ Real-time audio visualization features:
64
  - **Machine Learning Libraries:**
65
  - PyTorch 2.0+ for deep learning framework
66
  - pyannote.audio 3.1+ for speaker diarization
67
- - faster-whisper 0.9+ for speech recognition with language identification
68
  - Transformers 4.30+ for neural machine translation models
69
  - **Audio Processing:**
70
  - librosa 0.10+ for audio analysis and feature extraction
@@ -149,7 +149,7 @@ Multilingual-Audio-Intelligence-System/
149
  │ ├── main.py # AudioIntelligencePipeline orchestrator
150
  │ ├── audio_processor.py # Advanced audio preprocessing and normalization
151
  │ ├── speaker_diarizer.py # pyannote.audio integration for speaker identification
152
- │ ├── speech_recognizer.py # faster-whisper ASR with language detection
153
  │ ├── translator.py # 3-tier hybrid neural machine translation
154
  │ ├── output_formatter.py # Multi-format result generation and export
155
  │ ├── demo_manager.py # Enhanced demo file management
@@ -196,7 +196,7 @@ These cached demo results provide quick access to transcript, translation, and a
196
  The `speaker_diarizer.py` module uses pyannote.audio 3.1 for speaker identification with clustering algorithms, voice activity detection, and speaker embedding extraction. The `speaker_verifier.py` module extends this with advanced speaker verification using SpeechBrain, Wav2Vec2, and enhanced feature extraction for robust speaker identification and verification.
197
 
198
  - **Multilingual Speech Recognition:**
199
- The `speech_recognizer.py` module integrates faster-whisper for automatic speech recognition supporting 99+ languages with language identification, word-level timestamps, and confidence scoring. Features include VAD-based processing, batch optimization, and INT8 quantization.
200
 
201
  - **Multi-Tier Neural Machine Translation:**
202
  The `translator.py` module provides translation capabilities using a 3-tier system:
@@ -349,11 +349,13 @@ graph TB
349
 
350
  ## 14. Performance Benchmarks
351
 
352
- | Configuration | Model Loading | Memory Usage | Processing Speed | Accuracy |
353
- |---------------|---------------|--------------|------------------|----------|
354
- | CPU (4 cores) | ~15 minutes | ~6 GB | 2-5x real-time | 95%+ |
355
- | CPU + Cache | ~30 seconds | ~4 GB | 5-10x real-time | 95%+ |
356
- | GPU (CUDA) | ~8 minutes | ~8 GB | 10-14x real-time | 97%+ |
 
 
357
 
358
  ## 15. API Documentation
359
 
 
11
  - **Language Support**: Support for Tamil, Hindi, Telugu, Gujarati, Kannada, and other regional languages
12
  - **Multi-Tier Translation**: Fallback system ensuring broad translation coverage across language pairs
13
  - Providing precise speaker diarization with high accuracy using pyannote.audio technology
14
+ - Delivering multilingual automatic speech recognition supporting 100+ languages through OpenAI Whisper integration
15
  - Generating neural machine translations using Opus-MT, Google API alternatives, and mBART50 models
16
  - **File Management**: Processing strategies for various file sizes with appropriate user guidance
17
  - **CPU Optimization**: Designed for broad compatibility without GPU requirements
 
64
  - **Machine Learning Libraries:**
65
  - PyTorch 2.0+ for deep learning framework
66
  - pyannote.audio 3.1+ for speaker diarization
67
+ - openai-whisper for speech recognition with language identification
68
  - Transformers 4.30+ for neural machine translation models
69
  - **Audio Processing:**
70
  - librosa 0.10+ for audio analysis and feature extraction
 
149
  │ ├── main.py # AudioIntelligencePipeline orchestrator
150
  │ ├── audio_processor.py # Advanced audio preprocessing and normalization
151
  │ ├── speaker_diarizer.py # pyannote.audio integration for speaker identification
152
+ │ ├── speech_recognizer.py # Whisper ASR with language detection
153
  │ ├── translator.py # 3-tier hybrid neural machine translation
154
  │ ├── output_formatter.py # Multi-format result generation and export
155
  │ ├── demo_manager.py # Enhanced demo file management
 
196
  The `speaker_diarizer.py` module uses pyannote.audio 3.1 for speaker identification with clustering algorithms, voice activity detection, and speaker embedding extraction. The `speaker_verifier.py` module extends this with advanced speaker verification using SpeechBrain, Wav2Vec2, and enhanced feature extraction for robust speaker identification and verification.
197
 
198
  - **Multilingual Speech Recognition:**
199
+ The `speech_recognizer.py` module integrates OpenAI Whisper for automatic speech recognition supporting 99 languages with language identification, word-level timestamps, and confidence scoring.
200
 
201
  - **Multi-Tier Neural Machine Translation:**
202
  The `translator.py` module provides translation capabilities using a 3-tier system:
 
349
 
350
  ## 14. Performance Benchmarks
351
 
352
+ | Configuration | Model Loading | Memory Usage | Processing Speed |
353
+ |---------------|---------------|--------------|------------------|
354
+ | CPU (4 cores) | ~15 minutes | ~6 GB | 2-5x real-time |
355
+ | CPU + Cache | ~30 seconds | ~4 GB | 5-10x real-time |
356
+ | GPU (CUDA) | ~8 minutes | ~8 GB | 10-14x real-time |
357
+
358
+ *Indicative timings from informal runs; accuracy has not been formally benchmarked.*
359
 
360
  ## 15. API Documentation
361
 
Dockerfile CHANGED
@@ -32,7 +32,7 @@ RUN apt-get update && apt-get install -y \
32
  COPY requirements.txt .
33
 
34
  # Install Python dependencies with proper error handling
35
- RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
36
  pip install --no-cache-dir -r requirements.txt
37
 
38
  # Test critical imports to catch issues early
 
32
  COPY requirements.txt .
33
 
34
  # Install Python dependencies with proper error handling
35
+ RUN pip install --no-cache-dir --upgrade pip "setuptools<81" wheel && \
36
  pip install --no-cache-dir -r requirements.txt
37
 
38
  # Test critical imports to catch issues early
LICENSE ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2025 Prathamesh Sarjerao Vaidya
2
+
3
+ This work is licensed under the Creative Commons Attribution-NonCommercial 4.0
4
+ International License (CC BY-NC 4.0).
5
+ https://creativecommons.org/licenses/by-nc/4.0/
6
+
7
+ You are free to share and adapt this work for NON-COMMERCIAL purposes, provided
8
+ that you give appropriate credit:
9
+
10
+ "Multilingual-Audio-Intelligence-System" by Prathamesh Sarjerao Vaidya
11
+ https://github.com/Prathameshv07/Multilingual-Audio-Intelligence-System
12
+
13
+ and indicate if changes were made. Commercial use requires prior written
14
+ permission from the author.
15
+
16
+ The full legal code of the license follows.
17
+
18
+ --------------------------------------------------------------------------------
19
+
20
+ Creative Commons Attribution-NonCommercial 4.0 International
21
+
22
+ Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
23
+
24
+ Using Creative Commons Public Licenses
25
+
26
+ Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
27
+
28
+ Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
29
+
30
+ Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
31
+
32
+ Creative Commons Attribution-NonCommercial 4.0 International Public License
33
+
34
+ By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
35
+
36
+ Section 1 – Definitions.
37
+
38
+ a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
39
+
40
+ b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
41
+
42
+ c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
43
+
44
+ d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
45
+
46
+ e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
47
+
48
+ f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
49
+
50
+ g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
51
+
52
+ h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
53
+
54
+ i. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
55
+
56
+ j. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
57
+
58
+ k. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
59
+
60
+ l. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
61
+
62
+ Section 2 – Scope.
63
+
64
+ a. License grant.
65
+
66
+ 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
67
+
68
+ A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
69
+
70
+ B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
71
+
72
+ 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
73
+
74
+ 3. Term. The term of this Public License is specified in Section 6(a).
75
+
76
+ 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
77
+
78
+ 5. Downstream recipients.
79
+
80
+ A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
81
+
82
+ B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
83
+
84
+ 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
85
+
86
+ b. Other rights.
87
+
88
+ 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
89
+
90
+ 2. Patent and trademark rights are not licensed under this Public License.
91
+
92
+ 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
93
+
94
+ Section 3 – License Conditions.
95
+
96
+ Your exercise of the Licensed Rights is expressly made subject to the following conditions.
97
+
98
+ a. Attribution.
99
+
100
+ 1. If You Share the Licensed Material (including in modified form), You must:
101
+
102
+ A. retain the following if it is supplied by the Licensor with the Licensed Material:
103
+
104
+ i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
105
+
106
+ ii. a copyright notice;
107
+
108
+ iii. a notice that refers to this Public License;
109
+
110
+ iv. a notice that refers to the disclaimer of warranties;
111
+
112
+ v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
113
+
114
+ B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
115
+
116
+ C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
117
+
118
+ 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
119
+
120
+ 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
121
+
122
+ 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
123
+
124
+ Section 4 – Sui Generis Database Rights.
125
+
126
+ Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
127
+
128
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
129
+
130
+ b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
131
+
132
+ c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
133
+ For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
134
+
135
+ Section 5 – Disclaimer of Warranties and Limitation of Liability.
136
+
137
+ a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
138
+
139
+ b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
140
+
141
+ c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
142
+
143
+ Section 6 – Term and Termination.
144
+
145
+ a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
146
+
147
+ b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
148
+
149
+ 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
150
+
151
+ 2. upon express reinstatement by the Licensor.
152
+
153
+ For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
154
+
155
+ c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
156
+
157
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
158
+
159
+ Section 7 – Other Terms and Conditions.
160
+
161
+ a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
162
+
163
+ b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
164
+
165
+ Section 8 – Interpretation.
166
+
167
+ a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
168
+
169
+ b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
170
+
171
+ c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
172
+
173
+ d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
174
+
175
+ Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
176
+
177
+ Creative Commons may be contacted at creativecommons.org.
README.md CHANGED
@@ -5,6 +5,7 @@ colorFrom: blue
5
  colorTo: purple
6
  sdk: docker
7
  pinned: false
 
8
  short_description: AI for multilingual transcription & Indian language support
9
  ---
10
 
@@ -53,6 +54,10 @@ The system includes sample audio files for testing and demonstration:
53
  - [Tamil Wikipedia Interview](https://commons.wikimedia.org/wiki/File:Parvathisri-Wikipedia-Interview-Vanavil-fm.ogg): Tamil language interview on collaborative knowledge sharing (36+ minutes)
54
  - [Hindi Car Trouble](https://www.tuttlepublishing.com/content/docs/9780804844383/06-18%20Part2%20Car%20Trouble.mp3): Hindi conversation about daily life scenarios (2:45)
55
 
 
 
 
 
56
  ### Demo Features
57
  - **Pre-processed Results**: Cached processing for quick demonstration
58
  - **Interactive Interface**: Audio preview with waveform visualization
@@ -63,7 +68,7 @@ The system includes sample audio files for testing and demonstration:
63
 
64
  ### **Core Components**
65
  - **Advanced Speaker Diarization**: pyannote.audio with enhanced speaker verification
66
- - **Multilingual Speech Recognition**: faster-whisper with enhanced language detection
67
  - **Neural Translation**: Multi-tier system with intelligent fallback strategies
68
  - **Advanced Audio Processing**: Enhanced noise reduction with ML models and signal processing
69
 
@@ -159,7 +164,7 @@ Enhanced-Multilingual-Audio-Intelligence-System/
159
  │ ├── main.py # Enhanced pipeline orchestrator
160
  │ ├── audio_processor.py # Enhanced with smart file management
161
  │ ├── speaker_diarizer.py # pyannote.audio integration
162
- │ ├── speech_recognizer.py # faster-whisper integration
163
  │ ├── translator.py # 3-tier hybrid translation system
164
  │ ├── output_formatter.py # Multi-format output generation
165
  │ ├── demo_manager.py # Enhanced demo file management
@@ -273,11 +278,6 @@ MAX_FILE_SIZE_MB=200 # Smart file size limit
273
  - **Medium Files** (5-30 min): ~2-5 minutes total processing
274
  - **Large Files** (30+ min): Smart chunking with user warnings
275
 
276
- ### **Translation Accuracy**
277
- - **Tier 1 (Opus-MT)**: 90-95% accuracy for supported language pairs
278
- - **Tier 2 (Google API)**: 85-95% accuracy for broad language coverage
279
- - **Tier 3 (mBART50)**: 75-90% accuracy for rare languages and code-switching
280
-
281
  ### **Language Support**
282
  - **100+ Languages**: Through hybrid translation system
283
  - **Indian Languages**: Tamil, Hindi, Telugu, Gujarati, Kannada, Malayalam, Bengali, Marathi, Punjabi, Urdu
@@ -326,29 +326,32 @@ sdk: docker
326
  pinned: false
327
  ```
328
 
329
- ## 🤝 Contributing
330
-
331
- We welcome contributions to make this system even better for the competition:
332
-
333
- 1. **Indian Language Enhancements**: Additional regional language support
334
- 2. **Translation Improvements**: New tier implementations or fallback strategies
335
- 3. **UI/UX Improvements**: Enhanced visualizations and user interactions
336
- 4. **Performance Optimizations**: Speed and memory improvements
337
- 5. **Documentation**: Improved guides and examples
338
-
339
- ## 📄 License
340
-
341
- This enhanced system is released under MIT License - see the [LICENSE](LICENSE) file for details.
342
-
343
  ## 🙏 Acknowledgments
344
 
345
- - **Original Audio Intelligence Team**: Foundation system architecture
346
  - **Hugging Face**: Transformers and model hosting
347
  - **Google**: Translation API alternatives
348
  - **pyannote.audio**: Speaker diarization excellence
349
- - **OpenAI**: faster-whisper optimization
350
- - **Indian Language Community**: Testing and validation
351
 
352
  ---
353
 
354
- **A comprehensive solution for multilingual audio analysis and translation, designed to handle diverse language requirements and processing scenarios.**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  colorTo: purple
6
  sdk: docker
7
  pinned: false
8
+ license: cc-by-nc-4.0
9
  short_description: AI for multilingual transcription & Indian language support
10
  ---
11
 
 
54
  - [Tamil Wikipedia Interview](https://commons.wikimedia.org/wiki/File:Parvathisri-Wikipedia-Interview-Vanavil-fm.ogg): Tamil language interview on collaborative knowledge sharing (36+ minutes)
55
  - [Hindi Car Trouble](https://www.tuttlepublishing.com/content/docs/9780804844383/06-18%20Part2%20Car%20Trouble.mp3): Hindi conversation about daily life scenarios (2:45)
56
 
57
+ > The demo audio clips belong to their respective owners (linked above) and are included only for demonstration. They are **not** covered by this repository's license.
58
+
59
+ > **Known limitation:** in long or noisy recordings Whisper can occasionally produce repetitive "looping" text for a segment (visible in a few segments of the Tamil and Hindi demo results).
60
+
61
  ### Demo Features
62
  - **Pre-processed Results**: Cached processing for quick demonstration
63
  - **Interactive Interface**: Audio preview with waveform visualization
 
68
 
69
  ### **Core Components**
70
  - **Advanced Speaker Diarization**: pyannote.audio with enhanced speaker verification
71
+ - **Multilingual Speech Recognition**: OpenAI Whisper with enhanced language detection
72
  - **Neural Translation**: Multi-tier system with intelligent fallback strategies
73
  - **Advanced Audio Processing**: Enhanced noise reduction with ML models and signal processing
74
 
 
164
  │ ├── main.py # Enhanced pipeline orchestrator
165
  │ ├── audio_processor.py # Enhanced with smart file management
166
  │ ├── speaker_diarizer.py # pyannote.audio integration
167
+ │ ├── speech_recognizer.py # OpenAI Whisper integration
168
  │ ├── translator.py # 3-tier hybrid translation system
169
  │ ├── output_formatter.py # Multi-format output generation
170
  │ ├── demo_manager.py # Enhanced demo file management
 
278
  - **Medium Files** (5-30 min): ~2-5 minutes total processing
279
  - **Large Files** (30+ min): Smart chunking with user warnings
280
 
 
 
 
 
 
281
  ### **Language Support**
282
  - **100+ Languages**: Through hybrid translation system
283
  - **Indian Languages**: Tamil, Hindi, Telugu, Gujarati, Kannada, Malayalam, Bengali, Marathi, Punjabi, Urdu
 
326
  pinned: false
327
  ```
328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  ## 🙏 Acknowledgments
330
 
 
331
  - **Hugging Face**: Transformers and model hosting
332
  - **Google**: Translation API alternatives
333
  - **pyannote.audio**: Speaker diarization excellence
334
+ - **OpenAI**: Whisper speech recognition
 
335
 
336
  ---
337
 
338
+ **A comprehensive solution for multilingual audio analysis and translation, designed to handle diverse language requirements and processing scenarios.**
339
+
340
+ ## Citation
341
+
342
+ If you use or build on this project, please cite it. GitHub's **"Cite this repository"** button (generated from [`CITATION.cff`](CITATION.cff)) provides APA and BibTeX formats.
343
+
344
+ ```bibtex
345
+ @software{vaidya_multilingualaudioint_2025,
346
+ author = {Vaidya, Prathamesh Sarjerao},
347
+ title = {Multilingual Audio Intelligence System: Speaker Diarization, Speech Recognition and Translation},
348
+ year = {2025},
349
+ url = {https://github.com/Prathameshv07/Multilingual-Audio-Intelligence-System}
350
+ }
351
+ ```
352
+
353
+ ## License
354
+
355
+ [![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
356
+
357
+ © 2025 Prathamesh Sarjerao Vaidya. This work is licensed under the [Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0/). You may share and adapt it for **non-commercial** purposes, provided you **give appropriate credit** and indicate any changes. See [LICENSE](LICENSE) for details.
TECHNICAL_UNDERSTANDING.md CHANGED
@@ -140,13 +140,12 @@ function setupAudioVisualization(audioElement, canvas, mode) {
140
  ### **Advanced Speaker Diarization & Verification**
141
  - **Diarization Model**: pyannote/speaker-diarization-3.1
142
  - **Verification Models**: SpeechBrain ECAPA-TDNN, Wav2Vec2, enhanced feature extraction
143
- - **Accuracy**: 95%+ speaker identification with advanced verification
144
  - **Real-time Factor**: 0.3x processing speed
145
  - **Clustering**: Advanced algorithms for speaker separation
146
  - **Verification**: Multi-metric similarity scoring with dynamic thresholds
147
 
148
  ### **Speech Recognition**
149
- - **Engine**: faster-whisper (CPU-optimized)
150
  - **Language Detection**: Automatic with confidence scoring
151
  - **Word Timestamps**: Precise timing information
152
  - **VAD Integration**: Voice activity detection for efficiency
@@ -155,7 +154,6 @@ function setupAudioVisualization(audioElement, canvas, mode) {
155
 
156
  ### **Tier 1: Opus-MT Models**
157
  - **Coverage**: 40+ language pairs including Indian languages
158
- - **Quality**: 90-95% BLEU scores for supported pairs
159
  - **Focus**: European and major Asian languages
160
  - **Caching**: Intelligent model loading and memory management
161
 
@@ -169,7 +167,6 @@ function setupAudioVisualization(audioElement, canvas, mode) {
169
  - **Model**: facebook/mbart-large-50-many-to-many-mmt
170
  - **Languages**: 50 languages including Indian
171
  - **Use Case**: Offline processing, rare pairs, code-switching
172
- - **Quality**: 75-90% accuracy for complex scenarios
173
 
174
  ## Performance Optimizations
175
 
 
140
  ### **Advanced Speaker Diarization & Verification**
141
  - **Diarization Model**: pyannote/speaker-diarization-3.1
142
  - **Verification Models**: SpeechBrain ECAPA-TDNN, Wav2Vec2, enhanced feature extraction
 
143
  - **Real-time Factor**: 0.3x processing speed
144
  - **Clustering**: Advanced algorithms for speaker separation
145
  - **Verification**: Multi-metric similarity scoring with dynamic thresholds
146
 
147
  ### **Speech Recognition**
148
+ - **Engine**: OpenAI Whisper (`openai-whisper`)
149
  - **Language Detection**: Automatic with confidence scoring
150
  - **Word Timestamps**: Precise timing information
151
  - **VAD Integration**: Voice activity detection for efficiency
 
154
 
155
  ### **Tier 1: Opus-MT Models**
156
  - **Coverage**: 40+ language pairs including Indian languages
 
157
  - **Focus**: European and major Asian languages
158
  - **Caching**: Intelligent model loading and memory management
159
 
 
167
  - **Model**: facebook/mbart-large-50-many-to-many-mmt
168
  - **Languages**: 50 languages including Indian
169
  - **Use Case**: Offline processing, rare pairs, code-switching
 
170
 
171
  ## Performance Optimizations
172
 
demo_audio/Car_Trouble.mp3 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:cf02f5b91eac9f997bd5b34b0efc978871273b16feb988d4d5dfcf3d45a4f8ae
3
- size 738449
 
 
 
 
demo_audio/Film_Podcast.mp3 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:cf129ae36a824a575a90da05f703502a424b43c0cc86416c6c2dd1cbf2c1062b
3
- size 3687747
 
 
 
 
demo_audio/Tamil_Wikipedia_Interview.ogg DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:30b578d696c204c178cb3ea6754b63fb47a7fc56e2e9b7d33fd499359a88fefb
3
- size 32676479
 
 
 
 
demo_audio/Yuri_Kizaki.mp3 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:acd4b3289bf3e59b576f43a43dba3490951e2b8ec90f8d63489e98c937a89f4a
3
- size 519003
 
 
 
 
model_preloader.py CHANGED
@@ -205,28 +205,14 @@ class ModelPreloader:
205
  """
206
  try:
207
  if model_type == "whisper":
208
- # For Whisper, check the Systran faster-whisper cache
209
- whisper_cache = self.cache_dir / "whisper" / "models--Systran--faster-whisper-small"
210
- required_files = ["config.json", "model.bin", "tokenizer.json", "vocabulary.txt"]
211
-
212
- # Find the snapshot directory
213
- snapshots_dir = whisper_cache / "snapshots"
214
- if not snapshots_dir.exists():
215
- return False
216
-
217
- # Check for any snapshot directory (there should be one)
218
- snapshot_dirs = [d for d in snapshots_dir.iterdir() if d.is_dir()]
219
- if not snapshot_dirs:
220
- return False
221
-
222
- # Check if required files exist in the snapshot
223
- snapshot_path = snapshot_dirs[0] # Use the first (and likely only) snapshot
224
- for file in required_files:
225
- file_path = snapshot_path / file
226
- if not file_path.exists() or file_path.stat().st_size == 0:
227
- return False
228
-
229
- return True
230
 
231
  elif model_type in ["mbart", "opus_mt"]:
232
  # For Transformers models, check the HuggingFace cache structure
 
205
  """
206
  try:
207
  if model_type == "whisper":
208
+ # OpenAI Whisper stores each model as a single <name>.pt checkpoint
209
+ # under $XDG_CACHE_HOME/whisper (set to the model cache in the Dockerfile)
210
+ import os
211
+ xdg = os.environ.get("XDG_CACHE_HOME")
212
+ roots = [Path(xdg) / "whisper"] if xdg else []
213
+ roots += [self.cache_dir / "whisper", Path.home() / ".cache" / "whisper"]
214
+ return any((r / f"{model_name}.pt").exists() and (r / f"{model_name}.pt").stat().st_size > 0
215
+ for r in roots)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
 
217
  elif model_type in ["mbart", "opus_mt"]:
218
  # For Transformers models, check the HuggingFace cache structure
requirements.txt CHANGED
@@ -1,18 +1,16 @@
 
 
 
1
  # Core ML libraries with container-friendly versions
2
  torch==2.0.1
3
  torchaudio==2.0.2
4
- torchvision==0.15.2
5
-
6
- # Keep regular ONNX Runtime with container-safe environment variables
7
- # onnxruntime==1.15.1
8
 
9
  # Audio processing
10
  pyannote.audio==3.1.1
11
- openai-whisper==20231117
12
  librosa==0.10.1
13
  soundfile==0.12.1
14
  pydub==0.25.1
15
- webrtcvad==2.0.10
16
  resampy==0.4.2
17
 
18
  # NLP and Translation
@@ -20,7 +18,6 @@ transformers==4.35.2
20
  tokenizers==0.15.2
21
  sentencepiece==0.1.99
22
  deep-translator==1.11.4
23
- langdetect==1.0.9
24
  googletrans==4.0.2
25
 
26
  # Web framework
@@ -39,25 +36,18 @@ plotly==5.17.0
39
 
40
  # Utilities
41
  rich==13.7.0
42
- tqdm==4.66.1
43
  psutil==5.9.6
44
- pyyaml==6.0.1
45
  python-dotenv==1.0.0
46
- click==8.1.8
47
 
48
  # HuggingFace ecosystem
49
  huggingface-hub==0.16.4
50
  accelerate==0.20.3
51
  safetensors==0.6.2
52
 
53
- # Additional utilities
54
- ffmpeg-python==0.2.0
55
  httpx==0.28.1
56
  requests==2.31.0
57
 
58
- # Additional dependencies that might be needed
59
- pillow==10.0.1
60
  numba==0.58.1
61
  jinja2==3.1.2
62
- packaging==23.2
63
- joblib==1.3.2
 
1
+ # Build tooling: pyannote/lightning still import pkg_resources, removed in setuptools 81
2
+ setuptools<81
3
+
4
  # Core ML libraries with container-friendly versions
5
  torch==2.0.1
6
  torchaudio==2.0.2
 
 
 
 
7
 
8
  # Audio processing
9
  pyannote.audio==3.1.1
10
+ openai-whisper==20250625 # 20231117 no longer builds (needs pkg_resources, removed from setuptools)
11
  librosa==0.10.1
12
  soundfile==0.12.1
13
  pydub==0.25.1
 
14
  resampy==0.4.2
15
 
16
  # NLP and Translation
 
18
  tokenizers==0.15.2
19
  sentencepiece==0.1.99
20
  deep-translator==1.11.4
 
21
  googletrans==4.0.2
22
 
23
  # Web framework
 
36
 
37
  # Utilities
38
  rich==13.7.0
 
39
  psutil==5.9.6
 
40
  python-dotenv==1.0.0
 
41
 
42
  # HuggingFace ecosystem
43
  huggingface-hub==0.16.4
44
  accelerate==0.20.3
45
  safetensors==0.6.2
46
 
47
+ # HTTP clients
 
48
  httpx==0.28.1
49
  requests==2.31.0
50
 
51
+ # Pinned transitive dependencies
 
52
  numba==0.58.1
53
  jinja2==3.1.2
 
 
src/main.py CHANGED
@@ -408,7 +408,7 @@ class AudioIntelligencePipeline:
408
  word_timestamps=transcription_seg.word_timestamps if transcription_seg else None,
409
  model_info={
410
  'diarization_model': 'pyannote/speaker-diarization-3.1',
411
- 'transcription_model': f'faster-whisper-{self.whisper_model_size}',
412
  'translation_model': translation_result.model_used if translation_result else 'none'
413
  }
414
  )
 
408
  word_timestamps=transcription_seg.word_timestamps if transcription_seg else None,
409
  model_info={
410
  'diarization_model': 'pyannote/speaker-diarization-3.1',
411
+ 'transcription_model': f'whisper-{self.whisper_model_size}',
412
  'translation_model': translation_result.model_used if translation_result else 'none'
413
  }
414
  )
static/imgs/banner.png DELETED

Git LFS Details

  • SHA256: 9a5ed1a0acb8fc7a8174cb0dfbd8df2849380be7d7754d726b548816438ecdd1
  • Pointer size: 130 Bytes
  • Size of remote file: 89 kB
static/imgs/demo_mode_banner.png DELETED

Git LFS Details

  • SHA256: eba7c5900f15485fbfadbfd9fbc027a259e31bbfdecfc661e2c752e1186f3709
  • Pointer size: 130 Bytes
  • Size of remote file: 81.4 kB
static/imgs/demo_res_summary.png DELETED

Git LFS Details

  • SHA256: ad4e9f0f178b691af590614dadc9e8f302b274c35ebccbf0dbf99b9d9069c071
  • Pointer size: 130 Bytes
  • Size of remote file: 31.1 kB
static/imgs/demo_res_transcript_translate.png DELETED

Git LFS Details

  • SHA256: 4c42bfb013fda394dbd554cf4516f119ff78bfec14c758b06413c557d3fbf49e
  • Pointer size: 130 Bytes
  • Size of remote file: 81.9 kB
static/imgs/demo_res_visual.png DELETED

Git LFS Details

  • SHA256: 79b2abcd242cd7a797882c751eacf08eaa7b1abec8bf99a266dbafccf1cd2eb9
  • Pointer size: 130 Bytes
  • Size of remote file: 52.2 kB
static/imgs/full_mode_banner.png DELETED

Git LFS Details

  • SHA256: d4644edad345ae6b5089da6c31c199f4d7db80b82839ecad9738c570a0b4c549
  • Pointer size: 130 Bytes
  • Size of remote file: 53 kB