Esempio n. 1
0
import polyglotdb.io as aio
from polyglotdb.config import CorpusConfig

from polyglotdb import CorpusContext


graph_db = {'graph_host':'localhost', 'graph_port': 7474,
            'graph_user': '******', 'graph_password': '******'}

praat = r'C:\Users\michael\Documents\Praat\praatcon.exe'

reaper = r'D:\Dev\Tools\REAPER-master\reaper.exe'

config = CorpusConfig('buckeye', **graph_db)

config.reaper_path = reaper
#config.praat_path = praat

def call_back(*args):
    args = [x for x in args if isinstance(x, str)]
    if args:
        print(' '.join(args))

if __name__ == '__main__':
    with CorpusContext(config) as g:
        g.encode_pauses('^[{<].*')
        g.encode_utterances(min_pause_length = 0.25)
        #utterances = g.get_utterances('s1901b', config.pause_words)
        #print(len(utterances))
        #print(utterances[-10:])
        g.analyze_acoustics()
Esempio n. 2
0
from polyglotdb import CorpusContext

from polyglotdb.config import CorpusConfig

graph_db = {
    'graph_host': 'localhost',
    'graph_port': 7474,
    'graph_user': '******',
    'graph_password': '******'
}

praat = r'C:\Users\michael\Documents\Praat\praatcon.exe'

config = CorpusConfig('acoustic', **graph_db)

config.reaper_path = r'D:\Dev\Tools\REAPER-master\reaper.exe'


def call_back(*args):
    args = [x for x in args if isinstance(x, str)]
    if args:
        print(' '.join(args))


if __name__ == '__main__':
    with CorpusContext(config) as g:
        g.encode_pauses(['sil'])
        g.encode_utterances()
        g.analyze_acoustics()
Esempio n. 3
0
graph_db = {
    'graph_host': 'localhost',
    'graph_port': 7474,
    'graph_user': '******',
    'graph_password': '******'
}

praat = r'C:\Users\michael\Documents\Praat\praatcon.exe'

reaper = r'D:\Dev\Tools\REAPER-master\reaper.exe'

speaker_info_path = r'D:\Data\VIC\SpeakerInfo.txt'

config = CorpusConfig('buckeye', **graph_db)

config.reaper_path = reaper
config.praat_path = praat
config.pitch_algorithm = 'praat'


def call_back(*args):
    args = [x for x in args if isinstance(x, str)]
    if args:
        print(' '.join(args))


if __name__ == '__main__':
    with CorpusContext(config) as g:
        g.reset_acoustics()
        if not 'utterance' in g.annotation_types:
            g.encode_pauses('^[{<].*', call_back=call_back)
import sys
import os
import time
base = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.insert(0,base)
import polyglotdb.io as aio

from speechtools.corpus import CorpusContext

from polyglotdb.config import CorpusConfig

graph_db = {'graph_host':'localhost', 'graph_port': 7474,
            'graph_user': '******', 'graph_password': '******'}

praat = r'C:\Users\michael\Documents\Praat\praatcon.exe'

config = CorpusConfig('acoustic', **graph_db)

config.reaper_path = r'D:\Dev\Tools\REAPER-master\reaper.exe'

def call_back(*args):
    args = [x for x in args if isinstance(x, str)]
    if args:
        print(' '.join(args))

if __name__ == '__main__':
    with CorpusContext(config) as g:
        g.encode_pauses(['sil'])
        g.encode_utterances()
        g.analyze_acoustics()