awacke1 commited on
Commit
e9c43fb
·
verified ·
1 Parent(s): 805ff12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1659,7 +1659,8 @@ def generate_filename(prompt, file_type):
1659
 
1660
  # 15. Audio recorder to Wav file
1661
  def save_and_play_audio(audio_recorder):
1662
- audio_bytes = audio_recorder()
 
1663
  if audio_bytes:
1664
  filename = generate_filename("Recording", "wav")
1665
  with open(filename, 'wb') as f:
 
1659
 
1660
  # 15. Audio recorder to Wav file
1661
  def save_and_play_audio(audio_recorder):
1662
+ unique_key = hashlib.sha256(str(time.time()).encode()).hexdigest()
1663
+ audio_bytes = audio_recorder(key=unique_key)
1664
  if audio_bytes:
1665
  filename = generate_filename("Recording", "wav")
1666
  with open(filename, 'wb') as f: