diff --git a/graph b/graph new file mode 100755 index 0000000..7157a1c --- /dev/null +++ b/graph @@ -0,0 +1 @@ +qpwgraph diff --git a/main.py b/main.py new file mode 100644 index 0000000..0898000 --- /dev/null +++ b/main.py @@ -0,0 +1,30 @@ +import pyaudio + +p = pyaudio.PyAudio() + +# List devices to find the correct index for your AUX port +for i in range(p.get_device_count()): + dev_info = p.get_device_info_by_index(i) + print(f"Index: {i}, Name: {dev_info['name']}, Input Channels: {dev_info['maxInputChannels']}") + +## Open stream with the specific device index +#device_index = 1 # Replace with your AUX port's index +#stream = p.open( +# format=pyaudio.paInt16, +# channels=1, +# rate=44100, +# input=True, +# input_device_index=device_index, +# frames_per_buffer=1024 +#) +# +#print("Recording...") +#frames = [] +#for _ in range(0, int(44100 / 1024 * 5)): # Record for 5 seconds +# data = stream.read(1024) +# frames.append(data) +# +#stream.stop_stream() +#stream.close() +#p.terminate() +#print("Recording finished.") diff --git a/output.wav b/output.wav new file mode 100644 index 0000000..dae5fc1 Binary files /dev/null and b/output.wav differ diff --git a/run b/run new file mode 100755 index 0000000..d9a9517 --- /dev/null +++ b/run @@ -0,0 +1,2 @@ +ffmpeg -f alsa -i default output.wav + diff --git a/run2 b/run2 new file mode 100755 index 0000000..07807b0 --- /dev/null +++ b/run2 @@ -0,0 +1 @@ +ffmpeg -f alsa -i hw:1,0 output.wav