steep-balloon-41261
12/18/2023, 12:55 AMdazzling-processor-54786
12/18/2023, 12:56 AMRM_4M8qLETVuMurdazzling-processor-54786
12/18/2023, 12:57 AMdry-elephant-14928
12/19/2023, 1:24 AMTRACK_PUBLISH_REQUESTED means the client is able to connect, but we did not receive any bytes for the tracks.
For audio, you'd have to send us a bit of data for the server to be able to pick it up.dry-elephant-14928
12/19/2023, 1:24 AMdazzling-processor-54786
12/20/2023, 9:40 PMpowerful-garage-56223
12/20/2023, 11:13 PMasyncio.get_event_loop().run_until_complete(handle_join_room())
hard to say without seeing the full codedry-elephant-14928
12/20/2023, 11:14 PMdazzling-processor-54786
12/21/2023, 1:47 AMsync def publish_frames(source: rtc.AudioSource, frequency: int):
print('publishing frames')
amplitude = 32767 # for 16-bit audio
samples_per_channel = 480 # 10ms at 48kHz
time = np.arange(samples_per_channel) / SAMPLE_RATE
total_samples = 0
audio_frame = rtc.AudioFrame.create(SAMPLE_RATE, NUM_CHANNELS, samples_per_channel)
audio_data = np.frombuffer(audio_frame.data, dtype=np.int16)
while True:
time = (total_samples + np.arange(samples_per_channel)) / SAMPLE_RATE
sine_wave = (amplitude * np.sin(2 * np.pi * frequency * time)).astype(np.int16)
np.copyto(audio_data, sine_wave)
await source.capture_frame(audio_frame)
total_samples += samples_per_channeldazzling-processor-54786
12/21/2023, 3:14 AMI'm afraid we haven't added media device support yet. Currently the Python SDK is being used for publishing synthesized audio.Just to confirm -- this means I would need to use something like PyAudio to read the audio and then pipe that into AudioFrames?
boundless-energy-78552
12/21/2023, 3:14 AMdazzling-processor-54786
12/21/2023, 3:17 AMboundless-energy-78552
12/21/2023, 3:18 AMpowerful-garage-56223
12/21/2023, 3:18 AMdazzling-processor-54786
12/21/2023, 5:05 AMdazzling-processor-54786
12/21/2023, 5:07 AMline 570, in read
return pa.read_stream(self._stream, num_frames,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno -9981] Input overflowedboundless-energy-78552
12/21/2023, 2:32 PMdazzling-processor-54786
12/21/2023, 10:53 PMdazzling-processor-54786
12/21/2023, 11:36 PMdazzling-processor-54786
12/22/2023, 12:39 AM