File size: 289 Bytes
5506a57
 
 
0e772c5
5506a57
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from os.path import dirname
import json

filename = dirname(__file__) + '/../voa/train.jsonl'

with open(filename, 'r') as f:
    for line in f:
        data = json.loads(line)
        
        data['len2dur'] = round(data['length'] / data['duration'], 3)

        print(json.dumps(data))