Browse Source

set variable for calc to get n secs od audio

pull/65/head
Hongyu Li 2 years ago
parent
commit
76a2496b59
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      vz_acoustic_scene_analysis/scripts/stretch_audio.py

+ 2
- 1
vz_acoustic_scene_analysis/scripts/stretch_audio.py View File

@ -242,7 +242,8 @@ class ROSInterface:
output= False)
frames = []
for i in range(0, int(RESPEAKER_RATE / CHUNK * seconds)):
arr_length = int(RESPEAKER_RATE / CHUNK * seconds) # get length of array to produce n seconds of audio
for i in range(0, arr_length):
data = stream.read(CHUNK)
a = np.frombuffer(data,dtype=np.int16)[0::6] # extracts fused channel 0
print("a type: ", type(a[0]))

Loading…
Cancel
Save