docstr: Test st.audio using generated data in a file-like object.
docstr_tok: ["Test","st.audio","using","generated","data","in","a","file-like","object","."]
code: def test_st_audio_from_file(self):
      """Test st.audio using generated data in a file-like object."""
      sample_rate = 44100
      frequency = 440
      length = 5
  
      # Produces a 5 second Audio-File
      t = np.linspace(0, length, sample_rate * length)
      # Has frequency of 440Hz
      y = np.sin(frequency * 2 * np.pi * t)
  
      wavfile.write("test.wav", sample_rate, y)
  
      with io.open("test.wav", "rb") as f:
          st.audio(f)
  
      el = self.get_delta_from_queue().new_element
      self.assertTrue(".wav" in el.audio.url)
  
      os.remove("test.wav")
  
imports: import io
  import os
  from io import BytesIO
  import numpy
  from parameterized import parameterized
  from scipy.io import wavfile
  import streamlit
  from streamlit.elements.media import _maybe_convert_to_wav_bytes
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Alert_pb2 import Alert
  from streamlit.runtime.media_file_storage import MediaFileStorageError
  from streamlit.runtime.memory_media_file_storage import _calculate_file_id
  from streamlit.web.server.server import MEDIA_ENDPOINT
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 11 for calling the AudioTest obj's underlying member method code with example usage: obj.test_st_audio_from_file() without return types