Datasets:
ashraf-ali
commited on
Commit
β’
a9b01bb
1
Parent(s):
d14c2ac
Update folder
Browse filesThis view is limited to 50 files because it contains too many changes. Β
See raw diff
- audio_data.py +25 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/001001_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/001002_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/001003_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/001004_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/001005_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/001006_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/001007_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002001_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002002_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002003_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002004_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002005_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002006_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002007_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002008_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002009_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002010_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002011_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002012_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002013_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002014_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002015_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002016_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002017_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002018_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002019_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002020_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002021_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002022_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002023_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002024_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002025_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002026_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002027_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002028_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002029_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002030_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002031_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002032_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002033_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002034_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002035_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002036_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002037_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002038_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002039_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002040_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002041_Abdullah_Basfar_64kbps.wav +0 -0
- data/audio/{Imam β Qari}/Abdullah_Basfar/002042_Abdullah_Basfar_64kbps.wav +0 -0
audio_data.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
|
3 |
+
from pydub import AudioSegment
|
4 |
+
from pydub.utils import mediainfo
|
5 |
+
|
6 |
+
def duration(file_name):
|
7 |
+
audio = AudioSegment.from_file(file_name)
|
8 |
+
|
9 |
+
return audio.duration_seconds
|
10 |
+
|
11 |
+
|
12 |
+
file = 'users_ayahs.csv'
|
13 |
+
file_out = 'users_ayahs_new.csv'
|
14 |
+
|
15 |
+
df = pd.read_csv(file)
|
16 |
+
|
17 |
+
# Convert the dictionary into DataFrame
|
18 |
+
df = pd.DataFrame(df)
|
19 |
+
|
20 |
+
df['duration_in_seconds'] = df.apply(lambda row: duration(row['file_name']), axis=1)
|
21 |
+
df['quran_id'] = df['quran_id'].astype(str).str.pad(6, fillchar='0')
|
22 |
+
|
23 |
+
df.to_csv(file_out, encoding='utf-8', index=False)
|
24 |
+
|
25 |
+
|
data/audio/{Imam β Qari}/Abdullah_Basfar/001001_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/001002_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/001003_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/001004_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/001005_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/001006_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/001007_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002001_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002002_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002003_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002004_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002005_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002006_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002007_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002008_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002009_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002010_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002011_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002012_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002013_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002014_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002015_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002016_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002017_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002018_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002019_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002020_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002021_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002022_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002023_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002024_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002025_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002026_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002027_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002028_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002029_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002030_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002031_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002032_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002033_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002034_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002035_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002036_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002037_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002038_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002039_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002040_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002041_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|
data/audio/{Imam β Qari}/Abdullah_Basfar/002042_Abdullah_Basfar_64kbps.wav
RENAMED
File without changes
|