pytorch / pytorch/audio

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

Open
#3,784 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
799
Avg merge
58m
Merged PRs (30d)
3

Description

🐛 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the StreamWriter constructor path in torio/io/_streaming_media_encoder.py and reproduce the failure using dst="-" with format="audiotoolbox". Determine the expected behavior for writing to the speaker device, then verify that the resulting behavior is covered by an appropriate regression test or clear documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.