Yehor Smoliakov commited on
Commit
5506a57
1 Parent(s): f7a45a0

Add len2dur

Browse files
Files changed (2) hide show
  1. scripts/add_len2dur_field.py +12 -0
  2. yodas2/clean.jsonl +2 -2
scripts/add_len2dur_field.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from os.path import dirname
2
+ import json
3
+
4
+ filename = dirname(__file__) + '/../yodas2/clean.jsonl'
5
+
6
+ with open(filename, 'r') as f:
7
+ for line in f:
8
+ data = json.loads(line)
9
+
10
+ data['len2dur'] = round(data['length'] / data['duration'], 3)
11
+
12
+ print(json.dumps(data))
yodas2/clean.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6632c8e01bb7898a12fa9e13e52aed968f899e85c472bbf2d9f93f778cdd3a0c
3
- size 135367695
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b066346c5985360d694e14b58317d7d545bb34df3a16ee4d13f3a52c7cb81f02
3
+ size 142808120