File size: 289 Bytes
c818c2a
 
 
f7d74cc
c818c2a
 
 
 
 
 
 
 
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))