Skip to content

Commit

Permalink
Testing in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Kumar-laxmi committed Feb 19, 2024
1 parent 9e351f1 commit a5469b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Binary file modified app/__pycache__/views.cpython-311.pyc
Binary file not shown.
4 changes: 1 addition & 3 deletions app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,7 @@ def start_lungs_thread(sound):
sound_name, sound_type = sound[:-4], sound[-3:]
audio_path = df_lungs.loc[(df_lungs['sound_name'] == sound_name) & (df_lungs['sound_type'] == sound_type), 'audio_file_path'].values[0]
lungsbeat = AudioSegment.from_file(audio_path, format="wav")
speed_multiplier = 60 / 60.0 # Assuming 60 BPM as the baseline
adjusted_lungsbeat = lungsbeat.speedup(playback_speed=speed_multiplier)
exported_data = adjusted_lungsbeat.export(format="wav").read()
exported_data = lungsbeat.export(format="wav").read()
data, fs = sf.read(io.BytesIO(exported_data))
playing_thread_lungs = threading.Thread(target=play_lungs, args=(6, data, fs))
playing_thread_lungs.start()
Expand Down

0 comments on commit a5469b7

Please sign in to comment.