pytorch / audio

Data manipulation and transformation for audio signal processing, powered by PyTorch
https://pytorch.org/audio
BSD 2-Clause "Simplified" License
2.55k stars 657 forks source link

Failed to open output "-" (Invalid argument). #3784

Open liuliujiang opened 6 months ago

liuliujiang commented 6 months ago

🐛 Describe the bug

s = StreamWriter(dst="-", format="audiotoolbox") s.add_audio_stream(sample_rate, num_channels, format="s16")


RuntimeError Traceback (most recent call last) Cell In[5], line 2 1 # Configure StreamWriter to write to speaker device ----> 2 s = StreamWriter(dst="-", format="audiotoolbox") 3 s.add_audio_stream(sample_rate, num_channels, format="s16")

File E:\ProgramData\anaconda3\Lib\site-packages\torio\io_streaming_media_encoder.py:199, in StreamingMediaEncoder.init(self, dst, format, buffer_size) 197 self._s = ffmpeg_ext.StreamingMediaEncoderFileObj(dst, format, buffer_size) 198 else: --> 199 self._s = ffmpeg_ext.StreamingMediaEncoder(str(dst), format) 200 self._is_open = False

RuntimeError: Failed to open output "-" (Invalid argument).

Versions

2.3.0+cu121