Delete TAU/.ipynb_checkpoints
Browse files
TAU/.ipynb_checkpoints/README-checkpoint.md
DELETED
|
@@ -1,509 +0,0 @@
|
|
| 1 |
-
Title: TAU Urban Acoustic Scenes 2020 Mobile, Development dataset
|
| 2 |
-
|
| 3 |
-
# TAU Urban Acoustic Scenes 2020 Mobile, Development dataset
|
| 4 |
-
|
| 5 |
-
[Audio Research Group / Tampere University](http://arg.cs.tut.fi/)
|
| 6 |
-
|
| 7 |
-
Authors
|
| 8 |
-
|
| 9 |
-
- Toni Heittola (<toni.heittola@tuni.fi>, <http://www.cs.tut.fi/~heittolt/>)
|
| 10 |
-
- Annamaria Mesaros (<annamaria.mesaros@tuni.fi>, <http://www.cs.tut.fi/~mesaros/>)
|
| 11 |
-
- Tuomas Virtanen (<tuomas.virtanen@tuni.fi>, <http://www.cs.tut.fi/~tuomasv/>)
|
| 12 |
-
|
| 13 |
-
Recording and annotation
|
| 14 |
-
|
| 15 |
-
- Henri Laakso
|
| 16 |
-
- Ronal Bejarano Rodriguez
|
| 17 |
-
- Toni Heittola
|
| 18 |
-
|
| 19 |
-
## 1. Dataset
|
| 20 |
-
|
| 21 |
-
TAU Urban Acoustic Scenes 2020 Mobile development dataset consists of 10-seconds audio segments from 10 acoustic scenes:
|
| 22 |
-
|
| 23 |
-
- Airport - `airport`
|
| 24 |
-
- Indoor shopping mall - `shopping_mall`
|
| 25 |
-
- Metro station - `metro_station`
|
| 26 |
-
- Pedestrian street - `street_pedestrian`
|
| 27 |
-
- Public square - `public_square`
|
| 28 |
-
- Street with medium level of traffic - `street_traffic`
|
| 29 |
-
- Travelling by a tram - `tram`
|
| 30 |
-
- Travelling by a bus - `bus`
|
| 31 |
-
- Travelling by an underground metro - `metro`
|
| 32 |
-
- Urban park - `park`
|
| 33 |
-
|
| 34 |
-
Recordings were made with three devices (A, B and C) that captured audio simultaneously and 6 simulated devices (S1-S6). Each acoustic scene has 1440 segments (240 minutes of audio) recorded with device A (main device) and 108 segments of parallel audio (18 minutes) each recorded with devices B,C, and S1-S6. The dataset contains in total 64 hours of audio.
|
| 35 |
-
|
| 36 |
-
The dataset was collected by Tampere University of Technology between 05/2018 - 11/2018. The data collection has received funding from the European Research Council under the ERC Grant Agreement 637422 EVERYSOUND.
|
| 37 |
-
|
| 38 |
-
[](https://erc.europa.eu/)
|
| 39 |
-
|
| 40 |
-
### Preparation of the dataset
|
| 41 |
-
|
| 42 |
-
The dataset was recorded in 12 large European cities: Amsterdam, Barcelona, Helsinki, Lisbon, London, Lyon, Madrid, Milan, Prague, Paris, Stockholm, and Vienna. For all acoustic scenes, audio was captured in multiple locations: different streets, different parks, different shopping malls. In each location, multiple 2-3 minute long audio recordings were captured in a few slightly different positions (2-4) within the selected location. Collected audio material was cut into segments of 10 seconds length.
|
| 43 |
-
|
| 44 |
-
The main recording device (referred to as device A) consists of a binaural [Soundman OKM II Klassik/studio A3](http://www.soundman.de/en/products/) electret in-ear microphone and a [Zoom F8](https://www.zoom.co.jp/products/handy-recorder/zoom-f8-multitrack-field-recorder) audio recorder using 48 kHz sampling rate and 24 bit resolution. During the recording, the microphones were worn by the recording person in the ears, and head movement was kept to minimum.
|
| 45 |
-
|
| 46 |
-
Devices B and C are commonly available customer devices (e.g. smartphones, cameras) and were handled in typical ways (e.g. hand held). The audio recordings from these devices are of different quality than device A. All simultaneous recordings are time synchronized.
|
| 47 |
-
|
| 48 |
-
Post-processing of the recorded audio involves aspects related to privacy of recorded individuals, and possible errors in the recording process. The material was screened for content, and segments containing close microphone conversation were eliminated. Some interferences from mobile phones are audible, but are considered part of real-world recording process. In addition, data from device A was resampled and averaged into a single channel, to align with the properties of the data recorded with devices B and C.
|
| 49 |
-
|
| 50 |
-
Additionally, 11 mobile devices S1-S11 are simulated using the audio recorded with device A, impulse responses recorded with real devices, and additional dynamic range compression, in order to simulate realistic recordings. A recording from device A is processed through convolution with the selected Si impulse response, then processed with a selected set of parameters for dynamic range compression (device specific). The impulse responses are proprietary data and will not be published.
|
| 51 |
-
|
| 52 |
-
All provided audio data is single-channel, having a 44.1 KHz sampling rate, and 24 bit resolution.
|
| 53 |
-
|
| 54 |
-
A subset of the dataset has been previously published as TUT Urban Acoustic Scenes 2019 Development dataset. Audio segment filenames are retained for the segments coming from this dataset.
|
| 55 |
-
|
| 56 |
-
### Dataset statistics
|
| 57 |
-
|
| 58 |
-
The development set contains data from 10 cities and 9 devices: 3 real devices (A, B, C) and 6 simulated devices (S1-S6). Data from devices B, C and S1-S6 consists of randomly selected segments from the simultaneous recordings, therefore all overlap with the data from device A, but not necessarily with each other. The total amount of audio in the development set is **64 hours**. The evaluation dataset (TAU Urban Acoustic Scenes 2020 Mobile evaluation) contains data from all 12 cities, and five new devices (not available in the development set): real device D and simulated devices S7-S11.
|
| 59 |
-
|
| 60 |
-
#### Device A
|
| 61 |
-
|
| 62 |
-
##### Audio segments
|
| 63 |
-
|
| 64 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 65 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 66 |
-
| Airport | 1440 | 128 | 149 | 144 | 145 | 144 | 144 | 156 | 144 | 158 | 128 |
|
| 67 |
-
| Bus | 1440 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 |
|
| 68 |
-
| Metro | 1440 | 141 | 144 | 144 | 146 | 144 | 144 | 144 | 144 | 145 | 144 |
|
| 69 |
-
| Metro station | 1440 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 |
|
| 70 |
-
| Park | 1440 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 |
|
| 71 |
-
| Public square | 1440 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 |
|
| 72 |
-
| Shopping mall | 1440 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 |
|
| 73 |
-
| Street, pedestrian | 1440 | 145 | 145 | 144 | 145 | 144 | 144 | 144 | 144 | 145 | 140 |
|
| 74 |
-
| Street, traffic | 1440 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 |
|
| 75 |
-
| Tram | 1440 | 143 | 145 | 144 | 144 | 144 | 144 | 144 | 144 | 144 | 144 |
|
| 76 |
-
| **Total** | **14400** | **1421** | **1447** | **1440** | **1444** | **1440** | **1440** | **1452** | **1440** | **1456** | **1420** |
|
| 77 |
-
|
| 78 |
-
##### Recording locations
|
| 79 |
-
|
| 80 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 81 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 82 |
-
| Airport | 40 | 4 | 3 | 4 | 3 | 4 | 4 | 4 | 6 | 5 | 3 |
|
| 83 |
-
| Bus | 71 | 4 | 4 | 11 | 7 | 7 | 7 | 11 | 10 | 6 | 4 |
|
| 84 |
-
| Metro | 67 | 3 | 5 | 11 | 4 | 9 | 8 | 9 | 10 | 4 | 4 |
|
| 85 |
-
| Metro station | 57 | 5 | 6 | 4 | 12 | 5 | 4 | 9 | 4 | 4 | 4 |
|
| 86 |
-
| Park | 41 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 5 | 4 |
|
| 87 |
-
| Public_square | 43 | 4 | 4 | 4 | 4 | 5 | 4 | 4 | 6 | 4 | 4 |
|
| 88 |
-
| Shopping mall | 36 | 4 | 4 | 4 | 2 | 3 | 3 | 4 | 4 | 4 | 4 |
|
| 89 |
-
| Street, pedestrian | 46 | 7 | 4 | 4 | 4 | 4 | 5 | 5 | 5 | 4 | 4 |
|
| 90 |
-
| Street, traffic | 43 | 4 | 4 | 4 | 5 | 4 | 6 | 4 | 4 | 4 | 4 |
|
| 91 |
-
| Tram | 70 | 4 | 4 | 6 | 9 | 7 | 11 | 9 | 11 | 5 | 4 |
|
| 92 |
-
| **Total** | **514** | **43** | **42** | **56** | **54** | **52** | **56** | **63** | **65** | **45** | **39** |
|
| 93 |
-
|
| 94 |
-
#### Device B
|
| 95 |
-
|
| 96 |
-
##### Audio segments
|
| 97 |
-
|
| 98 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 99 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 100 |
-
| Airport | 107 | 11 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 101 |
-
| Bus | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 102 |
-
| Metro | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 103 |
-
| Metro station | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 104 |
-
| Park | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 105 |
-
| Public square | 107 | 11 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 106 |
-
| Shopping mall | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 107 |
-
| Street, pedestrian | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 108 |
-
| Street, traffic | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 109 |
-
| Tram | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 110 |
-
| **Total** | **1078** | **118** | **120** | **120** | **110** | **110** | **100** | **100** | **100** | **100** | **100** |
|
| 111 |
-
|
| 112 |
-
##### Recording locations
|
| 113 |
-
|
| 114 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 115 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 116 |
-
| Airport | 36 | 3 | 3 | 4 | 3 | 3 | 4 | 4 | 5 | 4 | 3 |
|
| 117 |
-
| Bus | 57 | 4 | 4 | 9 | 7 | 6 | 5 | 8 | 7 | 3 | 4 |
|
| 118 |
-
| Metro | 47 | 3 | 4 | 6 | 4 | 6 | 5 | 6 | 6 | 4 | 4 |
|
| 119 |
-
| Metro station | 45 | 4 | 4 | 3 | 8 | 5 | 3 | 7 | 3 | 4 | 4 |
|
| 120 |
-
| Park | 37 | 4 | 4 | 4 | 4 | 4 | 3 | 4 | 3 | 3 | 4 |
|
| 121 |
-
| Public_square | 37 | 3 | 4 | 4 | 4 | 5 | 3 | 4 | 4 | 3 | 3 |
|
| 122 |
-
| Shopping mall | 34 | 4 | 4 | 4 | 2 | 3 | 3 | 4 | 4 | 3 | 3 |
|
| 123 |
-
| Street, pedestrian | 43 | 6 | 3 | 4 | 4 | 4 | 5 | 5 | 4 | 4 | 4 |
|
| 124 |
-
| Street, traffic | 41 | 4 | 4 | 4 | 4 | 4 | 6 | 4 | 4 | 4 | 4 |
|
| 125 |
-
| Tram | 50 | 4 | 4 | 5 | 6 | 5 | 5 | 7 | 7 | 3 | 4 |
|
| 126 |
-
| **Total** | **427** | **39** | **37** | **47** | **46** | **44** | **42** | **53** | **47** | **35** | **37** |
|
| 127 |
-
|
| 128 |
-
#### Device C
|
| 129 |
-
|
| 130 |
-
##### Audio segments
|
| 131 |
-
|
| 132 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 133 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 134 |
-
| Airport | 107 | 11 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 135 |
-
| Bus | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 136 |
-
| Metro | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 137 |
-
| Metro station | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 138 |
-
| Park | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 139 |
-
| Public square | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 140 |
-
| Shopping mall | 107 | 12 | 12 | 12 | 10 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 141 |
-
| Street, pedestrian | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 142 |
-
| Street, traffic | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 143 |
-
| Tram | 107 | 11 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 144 |
-
| **Total** | **1077** | **118** | **120** | **120** | **109** | **110** | **100** | **100** | **100** | **100** | **100** |
|
| 145 |
-
|
| 146 |
-
##### Recording locations
|
| 147 |
-
|
| 148 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 149 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 150 |
-
| Airport | 38 | 4 | 3 | 4 | 3 | 3 | 4 | 4 | 5 | 5 | 3 |
|
| 151 |
-
| Bus | 50 | 4 | 4 | 7 | 6 | 5 | 4 | 7 | 7 | 3 | 3 |
|
| 152 |
-
| Metro | 54 | 3 | 3 | 6 | 4 | 9 | 6 | 7 | 8 | 4 | 4 |
|
| 153 |
-
| Metro station | 48 | 5 | 3 | 4 | 8 | 5 | 4 | 7 | 4 | 4 | 4 |
|
| 154 |
-
| Park | 39 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 3 | 4 |
|
| 155 |
-
| Public_square | 40 | 4 | 3 | 4 | 4 | 4 | 4 | 4 | 6 | 3 | 4 |
|
| 156 |
-
| Shopping mall | 35 | 4 | 4 | 4 | 2 | 3 | 3 | 4 | 4 | 3 | 4 |
|
| 157 |
-
| Street, pedestrian | 41 | 6 | 3 | 4 | 4 | 3 | 5 | 4 | 5 | 4 | 3 |
|
| 158 |
-
| Street, traffic | 40 | 4 | 3 | 4 | 4 | 4 | 6 | 4 | 4 | 4 | 3 |
|
| 159 |
-
| Tram | 51 | 4 | 4 | 5 | 6 | 4 | 8 | 6 | 7 | 3 | 4 |
|
| 160 |
-
| **Total** | **436** | **42** | **34** | **46** | **45** | **44** | **48** | **51** | **54** | **36** | **36** |
|
| 161 |
-
|
| 162 |
-
#### Device S1
|
| 163 |
-
|
| 164 |
-
##### Audio segments
|
| 165 |
-
|
| 166 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 167 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 168 |
-
| Airport | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 169 |
-
| Bus | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 170 |
-
| Metro | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 171 |
-
| Metro station | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 172 |
-
| Park | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 173 |
-
| Public square | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 174 |
-
| Shopping mall | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 175 |
-
| Street, pedestrian | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 176 |
-
| Street, traffic | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 177 |
-
| Tram | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 178 |
-
| **Total** | **1080** | **120** | **120** | **120** | **110** | **110** | **100** | **100** | **100** | **100** | **100** |
|
| 179 |
-
|
| 180 |
-
##### Recording locations
|
| 181 |
-
|
| 182 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 183 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 184 |
-
| Airport | 37 | 4 | 3 | 4 | 3 | 4 | 4 | 4 | 4 | 4 | 3 |
|
| 185 |
-
| Bus | 54 | 4 | 4 | 8 | 6 | 6 | 6 | 7 | 6 | 3 | 4 |
|
| 186 |
-
| Metro | 50 | 3 | 3 | 8 | 4 | 7 | 6 | 6 | 6 | 4 | 3 |
|
| 187 |
-
| Metro station | 48 | 5 | 4 | 4 | 9 | 5 | 4 | 5 | 4 | 4 | 4 |
|
| 188 |
-
| Park | 36 | 4 | 4 | 4 | 4 | 3 | 4 | 3 | 3 | 3 | 4 |
|
| 189 |
-
| Public_square | 37 | 4 | 4 | 4 | 4 | 4 | 4 | 3 | 3 | 3 | 4 |
|
| 190 |
-
| Shopping mall | 33 | 4 | 4 | 4 | 2 | 3 | 3 | 3 | 3 | 3 | 4 |
|
| 191 |
-
| Street, pedestrian | 40 | 6 | 3 | 4 | 4 | 3 | 5 | 2 | 5 | 4 | 4 |
|
| 192 |
-
| Street, traffic | 40 | 4 | 4 | 4 | 4 | 4 | 6 | 3 | 3 | 4 | 4 |
|
| 193 |
-
| Tram | 52 | 4 | 4 | 5 | 7 | 6 | 7 | 6 | 6 | 3 | 4 |
|
| 194 |
-
| **Total** | **427** | **42** | **37** | **49** | **47** | **45** | **49** | **42** | **43** | **35** | **38** |
|
| 195 |
-
|
| 196 |
-
#### Device S2
|
| 197 |
-
|
| 198 |
-
##### Audio segments
|
| 199 |
-
|
| 200 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 201 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 202 |
-
| Airport | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 203 |
-
| Bus | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 204 |
-
| Metro | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 205 |
-
| Metro station | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 206 |
-
| Park | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 207 |
-
| Public square | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 208 |
-
| Shopping mall | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 209 |
-
| Street, pedestrian | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 210 |
-
| Street, traffic | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 211 |
-
| Tram | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 212 |
-
| **Total** | **1080** | **120** | **120** | **120** | **110** | **110** | **100** | **100** | **100** | **100** | **100** |
|
| 213 |
-
|
| 214 |
-
##### Recording locations
|
| 215 |
-
|
| 216 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 217 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 218 |
-
| Airport | 36 | 3 | 3 | 4 | 3 | 4 | 4 | 4 | 4 | 4 | 3 |
|
| 219 |
-
| Bus | 58 | 4 | 4 | 9 | 6 | 6 | 7 | 9 | 6 | 3 | 4 |
|
| 220 |
-
| Metro | 55 | 3 | 3 | 10 | 4 | 8 | 8 | 5 | 7 | 4 | 3 |
|
| 221 |
-
| Metro station | 49 | 5 | 4 | 4 | 7 | 5 | 4 | 8 | 4 | 4 | 4 |
|
| 222 |
-
| Park | 38 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 2 | 4 |
|
| 223 |
-
| Public_square | 41 | 4 | 4 | 4 | 4 | 5 | 4 | 4 | 5 | 3 | 4 |
|
| 224 |
-
| Shopping mall | 34 | 4 | 4 | 3 | 2 | 3 | 3 | 4 | 4 | 3 | 4 |
|
| 225 |
-
| Street, pedestrian | 42 | 7 | 3 | 4 | 4 | 3 | 5 | 5 | 4 | 4 | 3 |
|
| 226 |
-
| Street, traffic | 42 | 4 | 4 | 4 | 5 | 4 | 6 | 4 | 4 | 4 | 3 |
|
| 227 |
-
| Tram | 51 | 4 | 4 | 5 | 7 | 6 | 7 | 7 | 4 | 3 | 4 |
|
| 228 |
-
| **Total** | **446** | **42** | **37** | **51** | **46** | **48** | **52** | **54** | **46** | **34** | **36** |
|
| 229 |
-
|
| 230 |
-
#### Device S3
|
| 231 |
-
|
| 232 |
-
##### Audio segments
|
| 233 |
-
|
| 234 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 235 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 236 |
-
| Airport | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 237 |
-
| Bus | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 238 |
-
| Metro | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 239 |
-
| Metro station | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 240 |
-
| Park | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 241 |
-
| Public square | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 242 |
-
| Shopping mall | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 243 |
-
| Street, pedestrian | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 244 |
-
| Street, traffic | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 245 |
-
| Tram | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 246 |
-
| **Total** | **1080** | **120** | **120** | **120** | **110** | **110** | **100** | **100** | **100** | **100** | **100** |
|
| 247 |
-
|
| 248 |
-
##### Recording locations
|
| 249 |
-
|
| 250 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 251 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 252 |
-
| Airport | 36 | 3 | 3 | 4 | 3 | 4 | 4 | 4 | 4 | 4 | 3 |
|
| 253 |
-
| Bus | 50 | 4 | 4 | 6 | 5 | 6 | 6 | 7 | 5 | 3 | 4 |
|
| 254 |
-
| Metro | 50 | 3 | 3 | 10 | 4 | 5 | 6 | 4 | 8 | 3 | 4 |
|
| 255 |
-
| Metro station | 44 | 4 | 4 | 4 | 6 | 5 | 4 | 7 | 3 | 4 | 3 |
|
| 256 |
-
| Park | 39 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 3 | 4 |
|
| 257 |
-
| Public_square | 39 | 4 | 4 | 3 | 4 | 5 | 4 | 4 | 4 | 3 | 4 |
|
| 258 |
-
| Shopping mall | 32 | 4 | 4 | 3 | 2 | 3 | 3 | 4 | 3 | 3 | 3 |
|
| 259 |
-
| Street, pedestrian | 39 | 6 | 3 | 3 | 4 | 4 | 4 | 5 | 3 | 4 | 3 |
|
| 260 |
-
| Street, traffic | 40 | 4 | 4 | 4 | 5 | 4 | 5 | 4 | 3 | 3 | 4 |
|
| 261 |
-
| Tram | 50 | 4 | 4 | 5 | 8 | 5 | 7 | 6 | 5 | 3 | 3 |
|
| 262 |
-
| **Total** | **419** | **40** | **37** | **46** | **45** | **45** | **47** | **49** | **42** | **33** | **35** |
|
| 263 |
-
|
| 264 |
-
#### Device S4
|
| 265 |
-
|
| 266 |
-
##### Audio segments
|
| 267 |
-
|
| 268 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 269 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 270 |
-
| Airport | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 271 |
-
| Bus | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 272 |
-
| Metro | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 273 |
-
| Metro station | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 274 |
-
| Park | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 275 |
-
| Public square | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 276 |
-
| Shopping mall | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 277 |
-
| Street, pedestrian | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 278 |
-
| Street, traffic | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 279 |
-
| Tram | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 280 |
-
| **Total** | **1080** | **120** | **120** | **120** | **110** | **110** | **100** | **100** | **100** | **100** | **100** |
|
| 281 |
-
|
| 282 |
-
##### Recording locations
|
| 283 |
-
|
| 284 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 285 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 286 |
-
| Airport | 36 | 3 | 3 | 4 | 3 | 4 | 4 | 4 | 4 | 4 | 3 |
|
| 287 |
-
| Bus | 53 | 4 | 4 | 9 | 5 | 6 | 5 | 6 | 7 | 3 | 4 |
|
| 288 |
-
| Metro | 50 | 3 | 2 | 8 | 4 | 7 | 6 | 7 | 6 | 4 | 3 |
|
| 289 |
-
| Metro station | 47 | 5 | 4 | 4 | 7 | 5 | 4 | 6 | 4 | 4 | 4 |
|
| 290 |
-
| Park | 38 | 4 | 3 | 4 | 4 | 4 | 4 | 4 | 4 | 3 | 4 |
|
| 291 |
-
| Public_square | 38 | 4 | 4 | 3 | 3 | 5 | 4 | 4 | 4 | 3 | 4 |
|
| 292 |
-
| Shopping mall | 35 | 4 | 4 | 4 | 2 | 3 | 3 | 4 | 4 | 3 | 4 |
|
| 293 |
-
| Street, pedestrian | 42 | 7 | 3 | 3 | 4 | 4 | 4 | 4 | 5 | 4 | 4 |
|
| 294 |
-
| Street, traffic | 41 | 4 | 4 | 4 | 4 | 4 | 5 | 4 | 4 | 4 | 4 |
|
| 295 |
-
| Tram | 51 | 4 | 4 | 6 | 6 | 7 | 5 | 7 | 5 | 3 | 4 |
|
| 296 |
-
| **Total** | **431** | **42** | **35** | **49** | **42** | **49** | **44** | **50** | **47** | **35** | **38** |
|
| 297 |
-
|
| 298 |
-
#### Device S5
|
| 299 |
-
|
| 300 |
-
##### Audio segments
|
| 301 |
-
|
| 302 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 303 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 304 |
-
| Airport | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 305 |
-
| Bus | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 306 |
-
| Metro | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 307 |
-
| Metro station | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 308 |
-
| Park | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 309 |
-
| Public square | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 310 |
-
| Shopping mall | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 311 |
-
| Street, pedestrian | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 312 |
-
| Street, traffic | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 313 |
-
| Tram | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 314 |
-
| **Total** | **1080** | **120** | **120** | **120** | **110** | **110** | **100** | **100** | **100** | **100** | **100** |
|
| 315 |
-
|
| 316 |
-
##### Recording locations
|
| 317 |
-
|
| 318 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 319 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 320 |
-
| Airport | 38 | 4 | 3 | 4 | 3 | 4 | 4 | 3 | 5 | 5 | 3 |
|
| 321 |
-
| Bus | 54 | 3 | 4 | 6 | 6 | 6 | 7 | 8 | 7 | 3 | 4 |
|
| 322 |
-
| Metro | 51 | 3 | 3 | 7 | 4 | 8 | 6 | 6 | 7 | 4 | 3 |
|
| 323 |
-
| Metro station | 45 | 5 | 3 | 3 | 7 | 4 | 4 | 7 | 4 | 4 | 4 |
|
| 324 |
-
| Park | 36 | 3 | 4 | 3 | 3 | 4 | 4 | 4 | 4 | 3 | 4 |
|
| 325 |
-
| Public_square | 39 | 3 | 4 | 3 | 4 | 4 | 4 | 4 | 6 | 3 | 4 |
|
| 326 |
-
| Shopping mall | 33 | 3 | 4 | 3 | 2 | 3 | 3 | 4 | 4 | 3 | 4 |
|
| 327 |
-
| Street, pedestrian | 42 | 6 | 3 | 4 | 4 | 4 | 4 | 5 | 5 | 4 | 3 |
|
| 328 |
-
| Street, traffic | 38 | 3 | 3 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 |
|
| 329 |
-
| Tram | 50 | 4 | 4 | 4 | 6 | 5 | 8 | 7 | 6 | 3 | 3 |
|
| 330 |
-
| **Total** | **426** | **37** | **35** | **41** | **43** | **46** | **48** | **52** | **52** | **36** | **36** |
|
| 331 |
-
|
| 332 |
-
#### Device S6
|
| 333 |
-
|
| 334 |
-
##### Audio segments
|
| 335 |
-
|
| 336 |
-
| Scene class | Segments | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 337 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | ---------| -------- | -------- | -------- | --------- | -------- |
|
| 338 |
-
| Airport | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 339 |
-
| Bus | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 340 |
-
| Metro | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 341 |
-
| Metro station | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 342 |
-
| Park | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 343 |
-
| Public square | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 344 |
-
| Shopping mall | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 345 |
-
| Street, pedestrian | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 346 |
-
| Street, traffic | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 347 |
-
| Tram | 108 | 12 | 12 | 12 | 11 | 11 | 10 | 10 | 10 | 10 | 10 |
|
| 348 |
-
| **Total** | **1080** | **120** | **120** | **120** | **110** | **110** | **100** | **100** | **100** | **100** | **100** |
|
| 349 |
-
|
| 350 |
-
##### Recording locations
|
| 351 |
-
|
| 352 |
-
| Scene class | Locations | Barcelona | Helsinki | Lisbon | London | Lyon | Milan | Paris | Prague | Stockholm | Vienna |
|
| 353 |
-
| ------------------ | --------- | --------- | --------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- |
|
| 354 |
-
| Airport | 36 | 4 | 3 | 4 | 3 | 4 | 3 | 3 | 5 | 4 | 3 |
|
| 355 |
-
| Bus | 55 | 3 | 4 | 9 | 7 | 6 | 5 | 9 | 6 | 2 | 4 |
|
| 356 |
-
| Metro | 51 | 3 | 2 | 7 | 4 | 7 | 6 | 7 | 8 | 3 | 4 |
|
| 357 |
-
| Metro station | 47 | 5 | 4 | 4 | 9 | 3 | 3 | 7 | 4 | 4 | 4 |
|
| 358 |
-
| Park | 37 | 3 | 4 | 4 | 4 | 4 | 3 | 4 | 4 | 3 | 4 |
|
| 359 |
-
| Public_square | 39 | 4 | 4 | 4 | 4 | 4 | 3 | 4 | 5 | 3 | 4 |
|
| 360 |
-
| Shopping mall | 33 | 3 | 4 | 4 | 2 | 3 | 2 | 4 | 4 | 3 | 4 |
|
| 361 |
-
| Street, pedestrian | 39 | 5 | 3 | 4 | 4 | 3 | 4 | 4 | 4 | 4 | 4 |
|
| 362 |
-
| Street, traffic | 39 | 3 | 4 | 3 | 4 | 4 | 5 | 4 | 4 | 4 | 4 |
|
| 363 |
-
| Tram | 56 | 4 | 4 | 6 | 7 | 6 | 7 | 6 | 9 | 3 | 4 |
|
| 364 |
-
| **Total** | **432** | **37** | **35** | **49** | **48** | **44** | **41** | **52** | **53** | **33** | **39** |
|
| 365 |
-
|
| 366 |
-
### File structure
|
| 367 |
-
|
| 368 |
-
```
|
| 369 |
-
dataset root
|
| 370 |
-
│ README.md this file, markdown-format
|
| 371 |
-
│ README.html this file, html-format
|
| 372 |
-
│ meta.csv meta data, csv-format with a header row, [audio file (string)][tab][scene label (string)][tab][identifier (string)][tab][source_label (string)]
|
| 373 |
-
│
|
| 374 |
-
└───audio 23035 audio segments, 24-bit 44.1kHz mono
|
| 375 |
-
│ │ airport-barcelona-0-0-a.wav file naming convention: [scene label]-[city]-[location id]-[segment id]-[device id].wav
|
| 376 |
-
│ │ airport-barcelona-0-1-a.wav
|
| 377 |
-
│ │ airport-barcelona-0-3-a.wav
|
| 378 |
-
│ │ ...
|
| 379 |
-
│ │ airport-barcelona-1-17-a.wav
|
| 380 |
-
│ │ airport-barcelona-1-17-b.wav
|
| 381 |
-
│ │ airport-barcelona-1-17-c.wav
|
| 382 |
-
│ │ ...
|
| 383 |
-
│
|
| 384 |
-
└───evaluation_setup cross-validation setup, 1 fold
|
| 385 |
-
│ fold1_train.csv training file list, csv-format with a header row, [audio file (string)][tab][scene label (string)]
|
| 386 |
-
│ fold1_test.csv testing file list, csv-format with a header row, [audio file (string)]
|
| 387 |
-
│ fold1_evaluate.csv evaluation file list, fold1_test.txt with added ground truth, csv-format with a header row, [audio file (string)][tab][scene label (string)]
|
| 388 |
-
|
| 389 |
-
```
|
| 390 |
-
|
| 391 |
-
## 2. Usage
|
| 392 |
-
|
| 393 |
-
The partitioning of the data was done based on the location of the original recordings. All segments recorded at the same location were included into a single subset - either **development dataset** or **evaluation dataset**. For each acoustic scene, 1440 segments recorded with device A, 108 segments recorded with device B, C and S1-S6 were included in the development dataset provided here. Evaluation dataset is provided separately.
|
| 394 |
-
|
| 395 |
-
### Training / test setup
|
| 396 |
-
|
| 397 |
-
A suggested training/test partitioning of the development set is provided in order to make results reported with this dataset uniform. The partitioning is done such that the segments recorded at the same location are included into the same subset - either training or testing. The partitioning is done aiming for a 70/30 ratio between the number of segments in training and test subsets while taking into account recording locations, and selecting the closest available option.
|
| 398 |
-
|
| 399 |
-
Data from devices A, B, C, S1, S2, S3 are available in both training and test sets. Audio segments coming from devices S4, S5, and S6 are used only for testing. Since the dataset includes balanced amount of material from devices (B, C, and S1-S6), this partitioning will leave a small subset of data from devices S4-S6 unused in the training / test setup. This material can be used when using full dataset to train the system and testing it with evaluation dataset.
|
| 400 |
-
|
| 401 |
-
The setup is provided with the dataset in the directory `evaluation_setup`.
|
| 402 |
-
|
| 403 |
-
#### Statistics
|
| 404 |
-
|
| 405 |
-
| Scene class | Train / Segments | Train / Locations | Test / Segments | Test / Locations | Unused / Segments | Unused / Locations |
|
| 406 |
-
| ------------------ | ---------------- | ----------------- | --------------- | ---------------- | ----------------- | ------------------ |
|
| 407 |
-
| Airport | 1393 | 28 | 296 | 12 | 613 | 40 |
|
| 408 |
-
| Bus | 1400 | 51 | 297 | 19 | 607 | 66 |
|
| 409 |
-
| Metro | 1382 | 47 | 297 | 20 | 625 | 65 |
|
| 410 |
-
| Metro station | 1380 | 40 | 297 | 16 | 627 | 55 |
|
| 411 |
-
| Park | 1429 | 30 | 297 | 11 | 578 | 39 |
|
| 412 |
-
| Public square | 1427 | 31 | 297 | 12 | 579 | 42 |
|
| 413 |
-
| Shopping mall | 1373 | 26 | 297 | 10 | 633 | 35 |
|
| 414 |
-
| Street, pedestrian | 1386 | 32 | 297 | 14 | 621 | 45 |
|
| 415 |
-
| Street, traffic | 1413 | 31 | 297 | 12 | 594 | 43 |
|
| 416 |
-
| Tram | 1379 | 49 | 296 | 20 | 628 | 67 |
|
| 417 |
-
| **Total** | **13962** | **365** | **2968** | **146** | **6105** | **497** |
|
| 418 |
-
|
| 419 |
-
#### Statistics; number of segments in train / test setup
|
| 420 |
-
|
| 421 |
-
| Scene class | Train / Device A | Train / Device B,C,S1-S3 | Test / Device A | Test / Device Device B,C,S1-S3 | Test / Device S4-S6 |
|
| 422 |
-
| ------------------ | ---------------- | ------------------------ | --------------- | ------------------------------ | ------------------- |
|
| 423 |
-
| Airport | 1019 | 75 | 33 | 33 | 33 |
|
| 424 |
-
| Bus | 1025 | 75 | 33 | 33 | 33 |
|
| 425 |
-
| Metro | 1007 | 75 | 33 | 33 | 33 |
|
| 426 |
-
| Metro station | 1005 | 75 | 33 | 33 | 33 |
|
| 427 |
-
| Park | 1054 | 75 | 33 | 33 | 33 |
|
| 428 |
-
| Public square | 1053 | 75 | 33 | 33 | 33 |
|
| 429 |
-
| Shopping mall | 999 | 75 | 33 | 33 | 33 |
|
| 430 |
-
| Street, pedestrian | 1011 | 75 | 33 | 33 | 33 |
|
| 431 |
-
| Street, traffic | 1038 | 75 | 33 | 33 | 33 |
|
| 432 |
-
| Tram | 1004 | 75 | 33 | 33 | 33 |
|
| 433 |
-
| **Total** | 10215 | **750** | **330** | **5 x 330 = 1650** | **3 x 330 = 990** |
|
| 434 |
-
|
| 435 |
-
#### Training
|
| 436 |
-
|
| 437 |
-
`evaluation setup\fold1_train.csv`
|
| 438 |
-
: training file list (in csv-format with a header row)
|
| 439 |
-
|
| 440 |
-
Format:
|
| 441 |
-
|
| 442 |
-
[audio file (string)][tab][scene label (string)]
|
| 443 |
-
|
| 444 |
-
#### Testing
|
| 445 |
-
|
| 446 |
-
`evaluation setup\fold1_test.csv`
|
| 447 |
-
: testing file list (in csv-format with a header row)
|
| 448 |
-
|
| 449 |
-
Format:
|
| 450 |
-
[audio file (string)]
|
| 451 |
-
|
| 452 |
-
#### Evaluating
|
| 453 |
-
|
| 454 |
-
`evaluation setup\fold1_evaluate.csv`
|
| 455 |
-
: evaluation file list (in csv-format with a header row), same as `fold1_test.csv` but with additional reference information. These two files are provided separately to prevent contamination with ground truth when testing the system
|
| 456 |
-
|
| 457 |
-
Format:
|
| 458 |
-
|
| 459 |
-
[audio file (string)][tab][scene label (string)]
|
| 460 |
-
|
| 461 |
-
### Custom setups
|
| 462 |
-
|
| 463 |
-
If not using the provided training/test setup, pay attention to the segments recorded at the same location. Location identifier can be found from `meta.csv` or from audio file names:
|
| 464 |
-
|
| 465 |
-
[scene label]-[city]-[location id]-[segment id]-[device id].wav
|
| 466 |
-
|
| 467 |
-
Make sure that all files having **same location id** are placed on the same side of the evaluation. Device id can be `a`, `b`, or `c`.
|
| 468 |
-
|
| 469 |
-
## 3. Changelog
|
| 470 |
-
|
| 471 |
-
**v1.0 / 2020-02-18**
|
| 472 |
-
|
| 473 |
-
* Initial commit
|
| 474 |
-
|
| 475 |
-
**v2.0 / 2020-05-11**
|
| 476 |
-
|
| 477 |
-
* Fixed synchronization between some segments from devices A, B, C. In this process, 118 files got replaced with correct audio content, and 5 files were removed due to unavailability of correct parallel recording from specific device.
|
| 478 |
-
- Files replaced (118): airport-barcelona-0-2-c, airport-barcelona-1-25-c, airport-barcelona-1-33-c, airport-barcelona-1-41-b, airport-barcelona-1-47-b, airport-barcelona-1-61-b, airport-barcelona-1-67-b, airport-barcelona-1-71-b, airport-barcelona-1-72-b, airport-barcelona-1-76-c, airport-barcelona-1-81-c, airport-barcelona-1-91-b, airport-barcelona-2-102-c, airport-barcelona-2-109-b, airport-barcelona-2-109-c, airport-barcelona-203-6122-b, airport-barcelona-203-6130-b, airport-barcelona-203-6131-b, airport-barcelona-203-6131-c, airport-barcelona-203-6132-b, airport-barcelona-203-6134-c, airport-barcelona-203-6135-c, airport-barcelona-203-6137-c, airport-helsinki-204-6141-b, airport-helsinki-204-6143-c, airport-helsinki-204-6148-b, airport-helsinki-204-6149-c, airport-helsinki-204-6155-c, airport-helsinki-204-6159-b, airport-helsinki-204-6160-b, airport-helsinki-204-6163-c, airport-helsinki-3-114-c, airport-helsinki-3-138-c, airport-helsinki-3-147-b, airport-helsinki-3-149-c, airport-helsinki-3-154-c, airport-helsinki-3-164-b, airport-helsinki-3-167-b, airport-helsinki-3-168-b, airport-helsinki-4-170-c, airport-helsinki-4-178-c, airport-helsinki-4-183-b, airport-helsinki-4-188-c, airport-helsinki-4-196-b, airport-helsinki-4-206-c, airport-helsinki-4-219-b, airport-helsinki-4-220-b, airport-vienna-13-516-c, airport-vienna-13-520-c, airport-vienna-13-522-c, airport-vienna-13-526-b, airport-vienna-13-545-b, airport-vienna-13-545-c, airport-vienna-13-547-b, airport-vienna-13-549-b, airport-vienna-13-549-c, airport-vienna-13-552-b, airport-vienna-209-6373-c, airport-vienna-209-6375-b, airport-vienna-209-6381-b, airport-vienna-209-6381-c, airport-vienna-209-6384-c, airport-vienna-209-6386-b, bus-helsinki-20-789-c, metro-barcelona-220-6644-c, metro-barcelona-220-6663-b, metro-barcelona-220-6676-c, metro-barcelona-220-6681-b, metro-barcelona-41-1232-b, metro-barcelona-41-1238-b, metro-barcelona-42-1269-c, metro-barcelona-42-1273-c, metro-barcelona-42-1277-b, metro-barcelona-42-1277-c, metro-barcelona-42-1281-c, metro-barcelona-42-1291-c, metro-barcelona-42-1296-b, metro_station-barcelona-63-1889-c, public_square-barcelona-108-3091-c, public_square-barcelona-108-3096-c, public_square-barcelona-108-3105-c, public_square-barcelona-108-3109-b, shopping_mall-london-131-3915-b, shopping_mall-london-131-3926-b, shopping_mall-london-131-3926-c, shopping_mall-london-131-3927-c, shopping_mall-london-131-3929-b, shopping_mall-london-131-3933-b, shopping_mall-london-131-3943-b, shopping_mall-london-131-3943-c, shopping_mall-london-131-3944-c, shopping_mall-london-256-7741-b, shopping_mall-london-256-7754-c, shopping_mall-london-256-7759-c, street_pedestrian-vienna-160-4866-b, street_pedestrian-vienna-160-4872-b, street_pedestrian-vienna-160-4880-b, street_pedestrian-vienna-160-4889-b, street_pedestrian-vienna-160-4896-b, street_traffic-lisbon-1171-45702-b, street_traffic-lyon-1220-44647-b, street_traffic-lyon-1220-44730-c, street_traffic-lyon-1220-44830-c, street_traffic-lyon-1220-44939-c, tram-barcelona-179-5519-c, tram-barcelona-179-5525-c, tram-barcelona-179-5556-b, tram-barcelona-179-5556-c, tram-barcelona-180-5559-c, tram-barcelona-180-5567-b, tram-barcelona-180-5571-b, tram-barcelona-180-5595-b, tram-barcelona-275-8385-c, tram-barcelona-275-8394-b, tram-barcelona-275-8396-c, tram-barcelona-275-8398-b, tram-barcelona-275-8398-c, tram-barcelona-275-8400-b
|
| 479 |
-
- Files removed (5): airport-barcelona-1-87-c, airport-barcelona-203-6132-b, shopping_mall-london-131-3930-c, public_square-barcelona-108-3109-b, tram-barcelona-275-8394-c
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
## 4. License
|
| 483 |
-
|
| 484 |
-
License permits free academic usage. Any commercial use is strictly prohibited. For commercial use, contact dataset authors.
|
| 485 |
-
|
| 486 |
-
Copyright (c) 2020 Tampere University and its licensors
|
| 487 |
-
All rights reserved.
|
| 488 |
-
Permission is hereby granted, without written agreement and without license or royalty
|
| 489 |
-
fees, to use and copy the TAU Urban Acoustic Scenes 2020 Mobile (“Work”) described in this document
|
| 490 |
-
and composed of audio and metadata. This grant is only for experimental and non-commercial
|
| 491 |
-
purposes, provided that the copyright notice in its entirety appear in all copies of this Work,
|
| 492 |
-
and the original source of this Work, (Audio Research Group at Tampere University of Technology),
|
| 493 |
-
is acknowledged in any publication that reports research using this Work.
|
| 494 |
-
Any commercial use of the Work or any part thereof is strictly prohibited.
|
| 495 |
-
Commercial use include, but is not limited to:
|
| 496 |
-
- selling or reproducing the Work
|
| 497 |
-
- selling or distributing the results or content achieved by use of the Work
|
| 498 |
-
- providing services by using the Work.
|
| 499 |
-
|
| 500 |
-
IN NO EVENT SHALL TAMPERE UNIVERSITY OR ITS LICENSORS BE LIABLE TO ANY PARTY
|
| 501 |
-
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
|
| 502 |
-
OF THIS WORK AND ITS DOCUMENTATION, EVEN IF TAMPERE UNIVERSITY OR ITS
|
| 503 |
-
LICENSORS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 504 |
-
|
| 505 |
-
TAMPERE UNIVERSITY AND ALL ITS LICENSORS SPECIFICALLY DISCLAIMS ANY
|
| 506 |
-
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
| 507 |
-
FITNESS FOR A PARTICULAR PURPOSE. THE WORK PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
|
| 508 |
-
THE TAMPERE UNIVERSITY HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
|
| 509 |
-
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TAU/.ipynb_checkpoints/Resample-checkpoint.py
DELETED
|
@@ -1,126 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import glob
|
| 3 |
-
import argparse
|
| 4 |
-
import numpy as np
|
| 5 |
-
import soundfile as sf
|
| 6 |
-
import librosa
|
| 7 |
-
from tqdm import tqdm
|
| 8 |
-
|
| 9 |
-
def resample_audio(input_file, output_file, target_sr=16000):
|
| 10 |
-
"""
|
| 11 |
-
将音频文件重采样到目标采样率
|
| 12 |
-
|
| 13 |
-
参数:
|
| 14 |
-
input_file: 输入音频文件路径
|
| 15 |
-
output_file: 输出音频文件路径
|
| 16 |
-
target_sr: 目标采样率,默认16000Hz (16kHz)
|
| 17 |
-
"""
|
| 18 |
-
try:
|
| 19 |
-
# 读取音频文件
|
| 20 |
-
y, sr = librosa.load(input_file, sr=None)
|
| 21 |
-
|
| 22 |
-
# 如果当前采样率不是目标采样率,则进行重采样
|
| 23 |
-
if sr != target_sr:
|
| 24 |
-
y_resampled = librosa.resample(y, orig_sr=sr, target_sr=target_sr)
|
| 25 |
-
# 保存重采样后的音频
|
| 26 |
-
sf.write(output_file, y_resampled, target_sr)
|
| 27 |
-
return True, sr, target_sr
|
| 28 |
-
else:
|
| 29 |
-
# 如果采样率已经是目标采样率,直接复制
|
| 30 |
-
sf.write(output_file, y, sr)
|
| 31 |
-
return False, sr, sr
|
| 32 |
-
except Exception as e:
|
| 33 |
-
print(f"处理文件 {input_file} 时出错: {e}")
|
| 34 |
-
return None, None, None
|
| 35 |
-
|
| 36 |
-
def main():
|
| 37 |
-
# 设置命令行参数
|
| 38 |
-
parser = argparse.ArgumentParser(description="将音频文件从44.1kHz重采样到16kHz")
|
| 39 |
-
parser.add_argument("--input_dir", type=str, default="/root/autodl-tmp/project/Phi-4-multimodal-instruct/eval/TAU/concatenated_audio",
|
| 40 |
-
help="包含concatenated音频文件的目录")
|
| 41 |
-
parser.add_argument("--output_dir", type=str, default="",
|
| 42 |
-
help="输出目录,默认为输入目录下的'resampled'子目录")
|
| 43 |
-
parser.add_argument("--replace", action="store_true", default=False,
|
| 44 |
-
help="直接替换原文件而不是创建新文件")
|
| 45 |
-
parser.add_argument("--target_sr", type=int, default=16000,
|
| 46 |
-
help="目标采样率(默认16000Hz)")
|
| 47 |
-
parser.add_argument("--recursive", action="store_true", default=True,
|
| 48 |
-
help="递归处理子目录(默认开启)")
|
| 49 |
-
|
| 50 |
-
args = parser.parse_args()
|
| 51 |
-
|
| 52 |
-
# 确定输入和输出目录
|
| 53 |
-
input_dir = args.input_dir
|
| 54 |
-
|
| 55 |
-
if args.replace:
|
| 56 |
-
output_dir = input_dir
|
| 57 |
-
print(f"将直接替换原始音频文件")
|
| 58 |
-
else:
|
| 59 |
-
if args.output_dir:
|
| 60 |
-
output_dir = args.output_dir
|
| 61 |
-
else:
|
| 62 |
-
output_dir = os.path.join(input_dir, "resampled")
|
| 63 |
-
print(f"重采样后的文件将保存到: {output_dir}")
|
| 64 |
-
# 创建输出目录(如果不存在)
|
| 65 |
-
os.makedirs(output_dir, exist_ok=True)
|
| 66 |
-
|
| 67 |
-
# 查找所有WAV文件
|
| 68 |
-
search_pattern = os.path.join(input_dir, "**", "*.wav") if args.recursive else os.path.join(input_dir, "*.wav")
|
| 69 |
-
audio_files = glob.glob(search_pattern, recursive=args.recursive)
|
| 70 |
-
|
| 71 |
-
print(f"找到 {len(audio_files)} 个WAV文件")
|
| 72 |
-
|
| 73 |
-
# 统计信息
|
| 74 |
-
total_files = len(audio_files)
|
| 75 |
-
resampled_count = 0
|
| 76 |
-
skipped_count = 0
|
| 77 |
-
error_count = 0
|
| 78 |
-
|
| 79 |
-
# 处理所有音频文件
|
| 80 |
-
for audio_file in tqdm(audio_files, desc="重采样进度"):
|
| 81 |
-
if args.replace:
|
| 82 |
-
output_file = audio_file
|
| 83 |
-
# 为替换模式创建临时文件
|
| 84 |
-
temp_output = audio_file + ".tmp"
|
| 85 |
-
else:
|
| 86 |
-
# 保持相对路径结构
|
| 87 |
-
rel_path = os.path.relpath(audio_file, input_dir)
|
| 88 |
-
output_file = os.path.join(output_dir, rel_path)
|
| 89 |
-
# 确保输出目录存在
|
| 90 |
-
os.makedirs(os.path.dirname(output_file), exist_ok=True)
|
| 91 |
-
|
| 92 |
-
# 执行重采样
|
| 93 |
-
if args.replace:
|
| 94 |
-
result, orig_sr, new_sr = resample_audio(audio_file, temp_output, args.target_sr)
|
| 95 |
-
else:
|
| 96 |
-
result, orig_sr, new_sr = resample_audio(audio_file, output_file, args.target_sr)
|
| 97 |
-
|
| 98 |
-
if result is None:
|
| 99 |
-
error_count += 1
|
| 100 |
-
elif result:
|
| 101 |
-
resampled_count += 1
|
| 102 |
-
# 对于替换模式,用临时文件替换原始文件
|
| 103 |
-
if args.replace:
|
| 104 |
-
try:
|
| 105 |
-
os.replace(temp_output, audio_file)
|
| 106 |
-
except Exception as e:
|
| 107 |
-
print(f"替换文件 {audio_file} 时出错: {e}")
|
| 108 |
-
error_count += 1
|
| 109 |
-
else:
|
| 110 |
-
skipped_count += 1
|
| 111 |
-
# 清理不需要的临时文件
|
| 112 |
-
if args.replace and os.path.exists(temp_output):
|
| 113 |
-
os.remove(temp_output)
|
| 114 |
-
|
| 115 |
-
# 打印统计信息
|
| 116 |
-
print("\n处理完成!")
|
| 117 |
-
print(f"总文件数: {total_files}")
|
| 118 |
-
print(f"重采样文件数: {resampled_count}")
|
| 119 |
-
print(f"跳过文件数 (已是目标采样率): {skipped_count}")
|
| 120 |
-
print(f"错误文件数: {error_count}")
|
| 121 |
-
|
| 122 |
-
if not args.replace and resampled_count > 0:
|
| 123 |
-
print(f"\n重采样后的文件保存在: {output_dir}")
|
| 124 |
-
|
| 125 |
-
if __name__ == "__main__":
|
| 126 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TAU/.ipynb_checkpoints/Segment_TAU_audio-checkpoint.py
DELETED
|
@@ -1,152 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import csv
|
| 3 |
-
from pydub import AudioSegment
|
| 4 |
-
from collections import defaultdict
|
| 5 |
-
import random # 用于随机打乱文件顺序(可选)
|
| 6 |
-
|
| 7 |
-
# --- 配置参数 ---
|
| 8 |
-
# 需要修改为CSV文件的路径
|
| 9 |
-
CSV_FILE_PATH = "/root/autodl-tmp/project/Phi-4-multimodal-instruct/eval/TAU-urban-acoustic-scenes-2020-mobile-development/meta.csv" # <--- 修改这里!
|
| 10 |
-
|
| 11 |
-
# 需要修改为音频文件所在的根目录(即包含audio子文件夹的目录)
|
| 12 |
-
AUDIO_ROOT_PATH = "/root/autodl-tmp/project/Phi-4-multimodal-instruct/eval/TAU-urban-acoustic-scenes-2020-mobile-development" # <--- 修改这里!
|
| 13 |
-
|
| 14 |
-
# 输出拼接后音频的目录
|
| 15 |
-
OUTPUT_DIR_BASE = os.path.join("/root/autodl-tmp/project/Phi-4-multimodal-instruct/eval/TAU-urban-acoustic-scenes-2020-mobile-development", "concatenated_audio")
|
| 16 |
-
|
| 17 |
-
# 目标音频时长范围 (分钟)
|
| 18 |
-
MIN_DURATION_MINUTES = 1.5
|
| 19 |
-
MAX_DURATION_MINUTES = 3.5
|
| 20 |
-
MIN_DURATION_MS = MIN_DURATION_MINUTES * 60 * 1000
|
| 21 |
-
MAX_DURATION_MS = MAX_DURATION_MINUTES * 60 * 1000
|
| 22 |
-
|
| 23 |
-
# 是否随机打乱每个组的音频文件顺序再拼接 (True/False)
|
| 24 |
-
SHUFFLE_FILES = False
|
| 25 |
-
|
| 26 |
-
# --- 辅助函数 ---
|
| 27 |
-
def get_audio_duration_ms(audio_segment):
|
| 28 |
-
"""获取 AudioSegment 的时长 (毫秒)"""
|
| 29 |
-
return len(audio_segment)
|
| 30 |
-
|
| 31 |
-
def ensure_dir(directory_path):
|
| 32 |
-
"""确保目录存在,如果不存在则创建"""
|
| 33 |
-
if not os.path.exists(directory_path):
|
| 34 |
-
os.makedirs(directory_path)
|
| 35 |
-
print(f"输出目录已确认/创建: {directory_path}")
|
| 36 |
-
|
| 37 |
-
# --- 主逻辑 ---
|
| 38 |
-
def process_audio_from_csv():
|
| 39 |
-
"""
|
| 40 |
-
从CSV文件读取音频文件信息,按scene_label和identifier拼接音频。
|
| 41 |
-
"""
|
| 42 |
-
if not os.path.isfile(CSV_FILE_PATH):
|
| 43 |
-
print(f"错误: CSV文件未找到: {CSV_FILE_PATH}")
|
| 44 |
-
return
|
| 45 |
-
|
| 46 |
-
# 按场景和标识符分组存储音频文件
|
| 47 |
-
audio_groups = defaultdict(list)
|
| 48 |
-
|
| 49 |
-
print(f"从CSV文件加载音频数据: {CSV_FILE_PATH}")
|
| 50 |
-
|
| 51 |
-
# 读取CSV文件
|
| 52 |
-
with open(CSV_FILE_PATH, 'r', encoding='utf-8') as csvfile:
|
| 53 |
-
reader = csv.reader(csvfile, delimiter='\t') # 使用tab作为分隔符
|
| 54 |
-
header = next(reader) # 跳过表头行
|
| 55 |
-
|
| 56 |
-
for row in reader:
|
| 57 |
-
if len(row) >= 4: # 确保行有足够的列
|
| 58 |
-
filename = row[0] # 相对路径,如 "audio/airport-lisbon-1000-40000-a.wav"
|
| 59 |
-
scene_label = row[1] # 如 "airport"
|
| 60 |
-
identifier = row[2] # 如 "lisbon-1000"
|
| 61 |
-
source_label = row[3] # 如 "a"
|
| 62 |
-
|
| 63 |
-
# 构建完整的音频文件路径
|
| 64 |
-
audio_path = os.path.join(AUDIO_ROOT_PATH, filename)
|
| 65 |
-
|
| 66 |
-
# 按场景和标识符分组
|
| 67 |
-
group_key = f"{scene_label}_{identifier}"
|
| 68 |
-
audio_groups[group_key].append(audio_path)
|
| 69 |
-
|
| 70 |
-
total_files = sum(len(files) for files in audio_groups.values())
|
| 71 |
-
print(f"\n共收集到 {total_files} 个音频文件,分为 {len(audio_groups)} 个分组。")
|
| 72 |
-
if not audio_groups:
|
| 73 |
-
print("没有找到任何可供处理的音频文件。")
|
| 74 |
-
return
|
| 75 |
-
|
| 76 |
-
ensure_dir(OUTPUT_DIR_BASE)
|
| 77 |
-
|
| 78 |
-
print("\n开始拼接音频...")
|
| 79 |
-
for group_key, audio_files in audio_groups.items():
|
| 80 |
-
print(f"\n处理分组: {group_key} (共 {len(audio_files)} 个文件)")
|
| 81 |
-
|
| 82 |
-
# 提取场景标签作为输出目录名
|
| 83 |
-
scene_label = group_key.split('_')[0]
|
| 84 |
-
|
| 85 |
-
# 为每个场景标签创建输出目录
|
| 86 |
-
scene_output_dir = os.path.join(OUTPUT_DIR_BASE, scene_label)
|
| 87 |
-
ensure_dir(scene_output_dir)
|
| 88 |
-
|
| 89 |
-
if SHUFFLE_FILES:
|
| 90 |
-
random.shuffle(audio_files)
|
| 91 |
-
else:
|
| 92 |
-
audio_files.sort()
|
| 93 |
-
|
| 94 |
-
current_segment_audio = AudioSegment.empty()
|
| 95 |
-
segment_count = 1
|
| 96 |
-
|
| 97 |
-
for audio_path in audio_files:
|
| 98 |
-
try:
|
| 99 |
-
if not os.path.isfile(audio_path):
|
| 100 |
-
print(f" 警告: 音频文件不存在: {audio_path}。跳过此文件。")
|
| 101 |
-
continue
|
| 102 |
-
audio = AudioSegment.from_file(audio_path)
|
| 103 |
-
except Exception as e:
|
| 104 |
-
print(f" 警告: 无法加载音频文件 {audio_path}。错误: {e}。跳过此文件。")
|
| 105 |
-
continue
|
| 106 |
-
|
| 107 |
-
if get_audio_duration_ms(current_segment_audio) == 0 or \
|
| 108 |
-
(get_audio_duration_ms(current_segment_audio) + get_audio_duration_ms(audio) <= MAX_DURATION_MS):
|
| 109 |
-
current_segment_audio += audio
|
| 110 |
-
else:
|
| 111 |
-
if get_audio_duration_ms(current_segment_audio) >= MIN_DURATION_MS:
|
| 112 |
-
output_filename = f"{group_key}_segment_{segment_count}.wav"
|
| 113 |
-
output_path = os.path.join(scene_output_dir, output_filename)
|
| 114 |
-
try:
|
| 115 |
-
print(f" 保存片段: {output_path} (时长: {get_audio_duration_ms(current_segment_audio)/1000.0:.2f}s)")
|
| 116 |
-
current_segment_audio.export(output_path, format="wav")
|
| 117 |
-
segment_count += 1
|
| 118 |
-
except Exception as e:
|
| 119 |
-
print(f" 错误: 保存文件 {output_path} 失败: {e}")
|
| 120 |
-
current_segment_audio = audio
|
| 121 |
-
|
| 122 |
-
# 处理最后一个片段
|
| 123 |
-
if get_audio_duration_ms(current_segment_audio) > 0:
|
| 124 |
-
if get_audio_duration_ms(current_segment_audio) >= MIN_DURATION_MS:
|
| 125 |
-
output_filename = f"{group_key}_segment_{segment_count}.wav"
|
| 126 |
-
output_path = os.path.join(scene_output_dir, output_filename)
|
| 127 |
-
try:
|
| 128 |
-
print(f" 保存最后片段: {output_path} (时长: {get_audio_duration_ms(current_segment_audio)/1000.0:.2f}s)")
|
| 129 |
-
current_segment_audio.export(output_path, format="wav")
|
| 130 |
-
except Exception as e:
|
| 131 |
-
print(f" 错误: 保存文件 {output_path} 失败: {e}")
|
| 132 |
-
else:
|
| 133 |
-
print(f" 注意: 分组 {group_key} 的最后一个片段时长 "
|
| 134 |
-
f"{get_audio_duration_ms(current_segment_audio)/1000.0:.2f}s, "
|
| 135 |
-
f"少于指定的最小时长 {MIN_DURATION_MINUTES} 分钟。此片段未保存。")
|
| 136 |
-
|
| 137 |
-
print("\n音频拼接处理完成。")
|
| 138 |
-
|
| 139 |
-
# --- 运行脚本 ---
|
| 140 |
-
if __name__ == "__main__":
|
| 141 |
-
if CSV_FILE_PATH == "d:/我的文档/meta.csv" and not os.path.exists(CSV_FILE_PATH): # 检查是否还是默认路径且不存在
|
| 142 |
-
print("错误:请在脚本中正确配置 'CSV_FILE_PATH' 变量!")
|
| 143 |
-
elif not os.path.exists(CSV_FILE_PATH):
|
| 144 |
-
print(f"错误: CSV_FILE_PATH ('{CSV_FILE_PATH}') 不存在,请检查路径!")
|
| 145 |
-
elif AUDIO_ROOT_PATH == "/root/autodl-tmp/project" and not os.path.exists(AUDIO_ROOT_PATH): # 检查是否还是默认路径且不存在
|
| 146 |
-
print("错误:请在脚本中正确配置 'AUDIO_ROOT_PATH' 变量!")
|
| 147 |
-
elif not os.path.exists(AUDIO_ROOT_PATH):
|
| 148 |
-
print(f"错误: AUDIO_ROOT_PATH ('{AUDIO_ROOT_PATH}') 不存在,请检查路径!")
|
| 149 |
-
else:
|
| 150 |
-
# 安装pydub: pip install pydub
|
| 151 |
-
# 如果处理m4a或非wav格式,确保ffmpeg已安装并添加到系统PATH
|
| 152 |
-
process_audio_from_csv()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TAU/.ipynb_checkpoints/acoustic_scene_task_meta-checkpoint.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
TAU/.ipynb_checkpoints/meta-checkpoint.csv
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|