Esempio n. 1
0
def play_sounds(wait_secs):

    for f in glob.glob('testsounds/44100/*.wav')[:5]:
        send('playfile_input {}'.format(f))
        sleep(wav_duration(f) + wait_secs)
Esempio n. 2
0
from utils import wav_duration


def play_sounds(wait_secs):

    for f in glob.glob('testsounds/44100/*.wav')[:5]:
        send('playfile_input {}'.format(f))
        sleep(wav_duration(f) + wait_secs)


if __name__ == '__main__':

    for i in range(4):
        sleep(10)
        print 'Starting recording'
        send('startrec')
        sleep(3)
        send('stoprec')
        send(
            'learnwav /Users/tidemann/Documents/NTNU/self_dot/testsounds/44100/count10_44100.wav'
        )
        print 'Stopping recording'

    send('facerecognition 1')

    # send('calibrateAudio')
    # raw_input('Press enter when calibrating is done')

    # print 'Playing sounds [self.] will learn. Make gestures.'

    # send('autolearn 1')
Esempio n. 3
0
def play_sounds(wait_secs):

    for f in glob.glob('testsounds/44100/*.wav')[:5]:
        send('playfile_input {}'.format(f))
        sleep(wav_duration(f) + wait_secs)
Esempio n. 4
0
from IO import send
from utils import wav_duration

def play_sounds(wait_secs):

    for f in glob.glob('testsounds/44100/*.wav')[:5]:
        send('playfile_input {}'.format(f))
        sleep(wav_duration(f) + wait_secs)

if __name__ == '__main__':

    for i in range(4):
        sleep(10)
        print 'Starting recording'
        send('startrec')
        sleep(3)
        send('stoprec')
        send('learnwav /Users/tidemann/Documents/NTNU/self_dot/testsounds/44100/count10_44100.wav')
        print 'Stopping recording'

    send('facerecognition 1')
    

    # send('calibrateAudio')
    # raw_input('Press enter when calibrating is done')

    # print 'Playing sounds [self.] will learn. Make gestures.'

    # send('autolearn 1')
    # send('memoryRecording 1')
Esempio n. 5
0
@author: Axel Tidemann, Øyvind Brandtsegg
@contact: [email protected], [email protected]
@license: GPL
'''

import time
import sys

from IO import send

secs = int(sys.argv[1]) if len(sys.argv) >= 2 else 5
mode = (sys.argv[2]) if len(sys.argv) >= 3 else 'both'
autowait = 5

if mode == 'filelearn':
    send('playfile {}'.format(sys.argv[3]))
    print 'learning'
    send('startrec')
    time.sleep(secs)
    send('stoprec')
    send('learn')
    print 'done learning'
elif mode == 'filerespond':
    send('playfile {}'.format(sys.argv[3]))
    print 'responding'
    send('startrec')
    time.sleep(secs)
    send('stoprec')
    send('respond')
elif mode == 'both':
    print 'learning'
Esempio n. 6
0
@author: Axel Tidemann, Øyvind Brandtsegg
@contact: [email protected], [email protected]
@license: GPL
'''

import time
import sys

from IO import send

secs = int(sys.argv[1]) if len(sys.argv) >= 2 else 5
mode = (sys.argv[2]) if len(sys.argv) >= 3 else 'both'
autowait = 5

if mode == 'filelearn':
    send('playfile {}'.format(sys.argv[3]))
    print 'learning'
    send('startrec')
    time.sleep(secs)
    send('stoprec')
    send('learn')
    print 'done learning'
elif mode == 'filerespond':
    send('playfile {}'.format(sys.argv[3]))
    print 'responding'
    send('startrec')
    time.sleep(secs)
    send('stoprec')
    send('respond')
elif mode == 'both':
    print 'learning'