IBM / Train-Custom-Speech-Model

Create a custom Watson Speech to Text model using specialized domain data
https://developer.ibm.com/patterns/customize-and-continuously-train-your-own-watson-speech-service/
Apache License 2.0
59 stars 42 forks source link

converting rtf files to txt #21

Closed rhagarty closed 5 years ago

rhagarty commented 5 years ago

python convert_rtf.py *.rtf does not work. It only works on one file at a time (wildcards not allowed)

rhagarty commented 5 years ago

This script worked for me:

import os
source = '.'

files = os.listdir(source)

for f in files:
    if f.endswith("rtf"):
        print 'Converting ' + f
        os.system("python convert_rtf.py " + f)
tonanhngo commented 5 years ago

Ah you are right, I actually used a for loop in bash, and documented it incorrectly in the README. Let me fix it.