You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## MP3 to Text Converter with Dialogue Role and Sentiment Analysis
2
+
3
+
## Project description
4
+
5
+
This Python script is designed to automatically process MP3 audio files and convert them to text format (.txt). It performs the following actions:
6
+
7
+
1.**Transcribe audio:** Uses OpenAI's Whisper model to recognize speech from audio files.
8
+
2.**Dialog segmentation:** Applies inaSpeechSegmenter to divide audio into speech segments (male/female voice) and non-speech segments.
9
+
3.**Role classification:** Uses RuBERT to determine the role of the speaker in a dialog (customer or salesperson).
10
+
4.**Tone Analysis:** Applies TextBlob to analyze the tone of a text (polarity and subjectivity).
11
+
5.**Saving results:** Transcribing, role and tonality analysis results are saved to text files (.txt) for each input MP3 file.
12
+
13
+
The script is designed to process dialog recordings, such as telephone conversations, for further analysis and text processing.
14
+
15
+
### Installation
16
+
### Pre-requisites
17
+
***Python 3.7 or higher** (Python 3.8+ is recommended)
18
+
***FFmpeg** must be installed and added to the system PATH variable (required to convert MP3 to WAV). Instructions for installing FFmpeg depend on your operating system.
19
+
20
+
### Installing the Python libraries
21
+
22
+
All dependencies must be installed before running the script. It is recommended to use a virtual environment (`venv`) to isolate the project dependencies.
23
+
24
+
1.**Create a virtual environment (optional, but recommended):**
25
+
26
+
27
+
```bash
28
+
python -m venv venv
29
+
```
30
+
31
+
2. **Activate the virtual environment:**
32
+
**Windows:**
33
+
34
+
```bash
35
+
venv\Scripts\activate
36
+
```
37
+
38
+
**Linux/macOS:**
39
+
40
+
```bash
41
+
source venv/bin/activate
42
+
```
43
+
3. ** Install the required libraries from the ``requirements.txt`` file:**``bash source venv/bin/activate ``` 3.
44
+
45
+
`````bash
46
+
pip install -r requirements.txt
47
+
```
48
+
(The `requirements.txt` file must be in the root folder of the project. Instructions for creating the `requirements.txt` file are below).
0 commit comments