speech-scoring/segment_data.py

13 lines
452 B
Python
Raw Normal View History

2017-11-28 10:16:39 +00:00
import pandas as pd
def fix_csv(collection_name = 'test'):
seg_data = pd.read_csv('./outputs/'+collection_name+'.csv',names=['phrase','filename'
,'start_phoneme','end_phoneme','start_time','end_time'])
seg_data.to_csv('./outputs/'+collection_name+'.fixed.csv')
def segment_data_gen(collection_name = 'test'):
collection_name = 'test'
2017-11-28 10:16:39 +00:00
seg_data = pd.read_csv('./outputs/'+collection_name+'.fixed.csv',index_col=0)