Ejemplo n.º 1
0
def afraid_patch(sampleFrequency, speed, depth, utterance_begin):
    filenamein = "/home/dereje/Desktop/TestFolder/Test.wav"
    filenameout = "/home/dereje/Desktop/TestFolder/TestAfraid.wav"

    start_time = [0.001, 0.111862, 0.223777, 0.348351]
    end_time = [0.111862, 0.223777, 0.348351, 0.500]
    start_time = np.asarray(start_time)
    end_time = np.asarray(end_time)
    utterance_begin = np.asarray(utterance_begin)

    n_bend = len(utterance_begin[0])
    cents = [120, -200, 8, 200]

    inflect_start_times = utterance_begin[np.arange(
        len(utterance_begin))] + start_time
    inflect_end_times = utterance_begin[np.arange(
        len(utterance_begin))] + end_time
    inflect_start_times = inflect_start_times.tolist()
    inflect_end_times = inflect_end_times.tolist()

    afraid_patch = Transformer()
    afraid_patch.tremolo(speed, depth)
    afraid_patch.bend(n_bend, inflect_start_times[0], inflect_end_times[0],
                      cents)
    afraid_patch.build(filenamein, filenameout)

    return afraid_patch
Ejemplo n.º 2
0
def afraid_sox_init(speed, depth, number_of_bends, start_time_now,
                    end_time_now, cents, tempo, intensity):
    patch = Transformer()
    patch.tremolo(speed, depth)
    patch.tempo(tempo, 's')
    patch.gain(intensity)
    # patch.bend(number_of_bends,start_time_now,end_time_now,cents,50)
    return patch
Ejemplo n.º 3
0
def afraid_sox_init(speed,depth,number_of_bends,start_time_now,end_time_now,cents,filenameout):
	patch = Transformer()
	patch.tremolo(speed,depth)
	patch.tempo(1.05,'s')
	patch.gain(1.1)
	#patch.bend(number_of_bends,start_time_now,end_time_now,cents,50)			
	patch.build(FILE_NAME_PATH,filenameout)
	return patch