Hallo liebe community,
Ich habe wie oben schon erwähnt ein Problem mit der ossaudiodev libarry in Python. Zugegeben ich bin noch Anfänger auf diesem Gebiet dennoch wollte ich mich einarbeiten und wollte ein Programm schreiben welches die Mikrofon Eingabe (den Mikrofon "input") ausliest. Das Programm sieht wie folgt aus :
import ossaudiodev from ossaudiodev import * import time from time import* dsp=ossaudiodev.open('/dev/dsp','r') fmt = dsp.setfmt(10) channels = dsp.channels(10) dsp.setparameters(fmt, channels, 15) i = 1 p = 200 while i <= 100: dsp.read(p) y = p print(y) sleep(1) i += 1
Das Problem liegt laut dem Fehlercode in diesem Bereich :
dsp.read(p)
Der Fehlercode selbst sieht wie folgt aus :
Traceback (most recent call last): File "/home/aaron2/Schreibtisch/projekte /readmic.py", line 17, in <module> dsp.read(p) OSError: [Errno 5] Input/output error
Danke für eure im Voraus, Aaron