finding exact duration of sound sample
parent
8f79316893
commit
705cf3d172
|
|
@ -66,6 +66,8 @@ def pm_snd(sample_file):
|
|||
# sample_file = 'inputs/self-apple/apple-low1.aiff'
|
||||
samples, samplerate, _ = snd.read(sample_file)
|
||||
return pm.Sound(values=samples,sampling_frequency=samplerate)
|
||||
|
||||
|
||||
def plot_sample_raw(sample_file='outputs/audio/sunflowers-Victoria-180-normal-870.aiff'):
|
||||
# %matplotlib inline
|
||||
# sample_file='outputs/audio/sunflowers-Victoria-180-normal-870.aiff
|
||||
|
|
@ -128,6 +130,7 @@ if __name__ == '__main__':
|
|||
# alex150spec.shape
|
||||
# alex_mfcc.shape
|
||||
# fred_180_norm_mfcc.shape
|
||||
mom_snd = pm_snd('outputs/test/moms_are_engineers-7608.aiff')
|
||||
plot_sample_pitch('outputs/audio/sunflowers-Victoria-180-normal-870.aiff')
|
||||
plot_sample_pitch('inputs/self-apple/apple-low1.aiff')
|
||||
plot_sample_pitch('inputs/self-apple/apple-low2.aiff')
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ def story_texts():
|
|||
|
||||
def generate_audio():
|
||||
synthQ = SynthesizerQueue()
|
||||
phrases = random.sample(story_texts(), 5) # story_texts()
|
||||
phrases = random.sample(story_texts(), 100) # story_texts()
|
||||
f = open(csv_dest_file, 'w')
|
||||
s_csv_w = csv.writer(f, quoting=csv.QUOTE_MINIMAL)
|
||||
i = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue