mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
fix 10.3 audio
This commit is contained in:
parent
38cfd6e7db
commit
95447a23ec
1 changed files with 5 additions and 3 deletions
|
@ -146,10 +146,9 @@ try:
|
|||
PYAU_CHANNELS = 1
|
||||
PYAU_RATE = 44100
|
||||
PYAU_INPUT_INDEX = 0
|
||||
except ImportError:
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
class _Recorder(object):
|
||||
|
||||
def postprocess(self):
|
||||
|
@ -173,7 +172,10 @@ class PyAudioThreadedRecorder(threading.Thread):
|
|||
|
||||
def run(self):
|
||||
chunk = 1024
|
||||
p = pyaudio.PyAudio()
|
||||
try:
|
||||
p = pyaudio.PyAudio()
|
||||
except NameError:
|
||||
raise Exception("Recording not supported on OSX10.3.")
|
||||
stream = p.open(format=PYAU_FORMAT,
|
||||
channels=PYAU_CHANNELS,
|
||||
rate=PYAU_RATE,
|
||||
|
|
Loading…
Reference in a new issue