Меню

Код ошибки 9985 device unavailable ошибка открытия устройства записи

Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from «Help menu > About Audacity«.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.

dEaF TO LiGhT

Posts: 1
Joined: Fri Oct 25, 2019 3:04 am
Operating System: Windows 10 / 11

Suddenly Can’t Overdub: Error -9985

Suddenly I can’t record a second track when overdub is on. I used to just fine. Nothing changed. I am running Windows 7 on a very powerful machine (i7, 32GB DDR4 ram), so my hardware is no problem. Using a Focusrite Saffire 6 USB as my interface. All of the sudden I get a message that says

Error opening recording device.
Error code: -9985 Device unavailable.

Before I was just getting the error message, but now it’s dumping debug reports. I attached it here.

Anyone knows why this is happening? Last week I was recording tracks just fine. Now I can’t punch in to repair a recording if I can’t use overdub.

Attachments
Audacity_dbgrpt-48836-20191024T200309.zip
(88.6 KiB) Downloaded 126 times


steve

Site Admin
Posts: 86151
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Suddenly Can’t Overdub: Error -9985

Post

by steve » Fri Oct 25, 2019 8:19 am

dEaF TO LiGhT wrote: ↑

Fri Oct 25, 2019 3:09 am


Nothing changed

«Something» changed, otherwise it would still be working. I think what you mean is that you didn’t change anything, at least not knowingly. So it could be due to a Windows update, or something that you changed inadvertently, or something that another application changed, or a hardware fault, or a connector come loose, or …

dEaF TO LiGhT wrote: ↑

Fri Oct 25, 2019 3:09 am


Error opening recording device.
Error code: -9985 Device unavailable.

The first thing I’d suggest is to try the most obvious. Shut down the computer, disconnect the USB lead to the Focusrite Saffire and visually inspect the lead and connectors (in good light). If that looks OK, reconnect it and ensure that the lead plugs in securely at both ends. If the computer USB connector appears at all loose, try plugging into a different USB socket. If you have another USB lead (one that you know is good), you could try temporarily changing the lead. Restart the computer, wait for it to fully boot up, and test.

Learn more about Nyquist programming at audionyq.com


luciaono

Posts: 3
Joined: Mon Nov 02, 2020 7:09 pm
Operating System: Windows 10 / 11

Re: Suddenly Can’t Overdub: Error -9985

Post

by luciaono » Mon Nov 02, 2020 7:17 pm

Hi. you solved? same problem. same sound card


luciaono

Posts: 3
Joined: Mon Nov 02, 2020 7:09 pm
Operating System: Windows 10 / 11

Re: Suddenly Can’t Overdub: Error -9985

Post

by luciaono » Tue Nov 03, 2020 7:10 pm

Hi. i have the same problem as deaf to light. i reinstalled the drivers. i reinstalled audacity. i changed the cable. I went to tweak some settings. I can only overdub when I uncheck ‘overdub’. but so I don’t hear the first trace.
please please please … help. thank you so much.


steve

Site Admin
Posts: 86151
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Suddenly Can’t Overdub: Error -9985

Post

by steve » Wed Nov 04, 2020 9:56 am

Open the Windows Sound control panel and ensure that the sample rate for the Focusrite is the same in both the Recording tab and the Playback tab.

Learn more about Nyquist programming at audionyq.com


kozikowski

Posts: 71671
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Suddenly Can’t Overdub: Error -9985

Post

by kozikowski » Wed Nov 04, 2020 10:21 am

Open the Windows Sound control panel and ensure that the sample rate for the Focusrite is the same in both the Recording tab and the Playback tab.

And do post back if that solves it. There are several posters with the same problem.

This is a forum, not a help desk. Users helping each other.

Koz


luciaono

Posts: 3
Joined: Mon Nov 02, 2020 7:09 pm
Operating System: Windows 10 / 11

Re: Suddenly Can’t Overdub: Error -9985

Post

by luciaono » Thu Nov 05, 2020 8:55 am

Thanks steve. thank you very much.


Содержание

  • 1 Решение 1. Убедитесь, что внешнее звуковое устройство подключено (только для настольных компьютеров)
  • 2
    Решение 2. Убедитесь, что внешнее звуковое устройство включено
  • 3 Решение 3. Убедитесь, что настройки аудиоустройства в Audacity настроены правильно
  • 4 Решение 4. Отключите программное проигрывание ввода в Audacity
  • 5 Решение 5. Обновите аудиодрайвер
  • 6 Решение 6. Перезапустите службу Windows Audio Endpoint Builder.

ИСПРАВЛЕНИЕ: Ошибка открытия звукового устройства. Пожалуйста, проверьте настройки записывающего устройства и частоту дискретизации проекта.
Если вы получили ошибку «Ошибка при открытии звукового устройства”, Используя Audacity для записи звука, не беспокойтесь. Вы можете исправить ошибку, следуя простым инструкциям ниже.
Сайт Audacity предоставил советы по устранению этой проблемы. Но, похоже, не очень легко следовать инструкциям. Если вы попробовали решения на их веб-сайте, но ошибка не исчезла, попробуйте шесть решений в этом посте.

Есть шесть решений для вас, чтобы попытаться исправить эту ошибку. Возможно, вам не придется пробовать их все. Просто пройдите вниз по началу списка, пока не найдете тот, который подходит именно вам.

  1. Убедитесь, что внешнее звуковое устройство подключено (только на рабочем столе)
  2. Убедитесь, что внешнее звуковое устройство включено
  3. Убедитесь, что настройки аудиоустройства в Audacity настроены правильно
  4. Отключить прохождение программного обеспечения в Audacity
  5. Обновите аудио драйвер
  6. Перезапустите службу Windows Audio Endpoint Builder.

Решение 1. Убедитесь, что внешнее звуковое устройство подключено (только для настольных компьютеров)

Если вы используете настольный компьютер, убедитесь, что устройство, которое вы используете для прослушивания звука, например внешние динамики, подключено.
Если вы подключили внешнее звуковое устройство к компьютеру, убедитесь, что они распознаются вашим компьютером.
Как проверить: Если в системном трее отображается красный значок с кружком в виде значка динамика, это означает, что внешнее звуковое устройство (например, ваши динамики или микрофон) не подключено к компьютеру. В этом случае отключите устройство и подключите его снова. После этого, если проблема все еще существует, см. Шаги в Решение 2 проверить, не отключено ли устройство.

Решение 2. Убедитесь, что внешнее звуковое устройство включено

Если внешние динамики или микрофон отключены, ошибка «Ошибка открытия звукового устройства. Попробуйте изменить аудио хост, записывающее устройство и частоту дискретизации проекта» Поэтому, когда вы получаете эту ошибку, проверьте, не отключено ли устройство. Если он отключен, включите его вручную.
Выполните следующие действия, чтобы проверить, не отключены ли динамики:

1) Щелкните правой кнопкой мыши значок динамика на панели задач и выберите Устройства воспроизведения.

2) Если вы видите, что динамики отключены, щелкните правой кнопкой мыши на элементе, а затем выберите включить. Если вы видите, что колонки включены, пропустите этот шаг.

Если вы используете ноутбук, Вы также должны проверить, если микрофон устройство отключено.
Следуй этим шагам:
1) Щелкните правой кнопкой мыши значок динамика на панели задач и выберите Записывающие устройства.

2) Если вы видите, что микрофон отключен, щелкните правой кнопкой мыши на элементе, затем выберите включить. Если вы видите, что микрофон включен, пропустите этот шаг.

Решение 3. Убедитесь, что настройки аудиоустройства в Audacity настроены правильно

Эта ошибка может быть вызвана неправильными настройками аудиоустройства в Audacity. Поэтому проверьте и убедитесь, что настройки аудиоустройства в Audacity настроены правильно.
Следуй этим шагам:
1) Открыть дерзость.

2) Нажмите редактировать в строке меню и выберите предпочтения.

3) Нажмите приборы.

3) Убедитесь, что хозяин поле установлено в Windows WASAPI.

После того, как вы установите для хоста Windows WASAPI, вы увидите значения поля «Устройство» в разделе «Воспроизведение», а устройство в разделе «Запись» автоматически изменится.

5) Нажмите Хорошо кнопка.

6) Проверьте, можете ли вы успешно записать.

Решение 4. Отключите программное проигрывание ввода в Audacity

Программное обеспечение Playthrough не должно быть включено при записи звука. Если он включен, возможно, возникнет ошибка «Ошибка открытия звукового устройства».
Выполните следующие шаги, чтобы проверить, проверен ли Software Playthrough. И снимите флажок, если вам нужно.
1) Открыть дерзость.

2) Нажмите редактировать в строке меню и выберите предпочтения.

3) Нажмите запись.

4) В разделе Прохождение, если вы видите Программное обеспечение Прохождение ввода проверено, снимите флажок Затем нажмите Хорошо кнопка. Если нет, пропустите это решение, а затем попробуйте другие решения.

Решение 5. Обновите аудиодрайвер

Если установленный аудиодрайвер устарел, он может не поддерживать функцию записи Audacity. Чтобы исправить ошибку, вы можете попробовать обновить аудио драйвер.
Вы можете обновить аудио драйвер вручную. Просто перейдите на веб-сайт производителя вашего ПК или веб-сайт производителя звуковой карты, чтобы проверить и загрузить последнюю версию аудиодрайвера. Если у вас нет времени, терпения или навыков работы с компьютером для обновления драйвера вручную, вы можете сделать это автоматически с помощью Driver Easy.
Driver Easy автоматически распознает вашу систему и найдет для нее правильные драйверы. Вам не нужно точно знать, на какой системе работает ваш компьютер, вам не нужно рисковать загрузкой и установкой неправильного драйвера, и вам не нужно беспокоиться об ошибках при установке.

Вы можете автоматически обновить драйверы с помощью БЕСПЛАТНОЙ или Профессиональной версии Driver Easy. Но в версии Pro это займет всего 2 клика (и вы получите полную поддержку и 30-дневную гарантию возврата денег):
1) Скачать и установите Driver Easy.
2) Запустите Driver Easy и нажмите Сканировать сейчас. Driver Easy проверит ваш компьютер и обнаружит проблемы с драйверами.

3) Нажмите Обновить Кнопка рядом с помеченным звуковым драйвером для автоматической загрузки и установки правильной версии этого драйвера (вы можете сделать это с БЕСПЛАТНОЙ версией).

Или нажмите Обновить все для автоматической загрузки и установки правильной версии всех драйверов, которые отсутствуют или устарели в вашей системе (для этого требуется версия Pro — вам будет предложено выполнить обновление при нажатии кнопки «Обновить все»).

4) После обновления драйвера проверьте, можете ли вы успешно записать звук.

Решение 6. Перезапустите службу Windows Audio Endpoint Builder.

Если служба Windows Audio Endpoint Builder не работает должным образом, эта ошибка возникнет. Поэтому перезапустите службу Windows Audio Endpoint Builder, чтобы попытаться устранить проблему «Ошибка открытия звукового устройства».
Следуйте инструкциям ниже:
1) На клавиатуре нажмите Win + R (Клавиша с логотипом Windows и клавиша R) одновременно, чтобы вызвать окно запуска.

2) Тип services.msc и нажмите Войти открыть окно Сервисы.

3) Нажмите Конструктор конечных точек Windows Audio, затем нажмите Запустить снова. Следуйте инструкциям на экране.

4) Проверьте, можете ли вы успешно выполнить запись.
Надеемся, что приведенные выше решения помогут вам решить проблему. Если у вас есть какие-либо вопросы, пожалуйста, не стесняйтесь оставлять свои комментарии. Я хотел бы услышать о любых идеях или предложениях.

I connected a USB headset to listen to a sound made by sounddevice as part of #198, and I got the following error:

Traceback (most recent call last):
  File "foo.py", line 45, in <module>
    play(sample_rate)
  File "foo.py", line 39, in play
    sounddevice.play(array_2, samplerate=hz)
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 154, in play
    **kwargs)
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 2417, in start_stream
    **kwargs)
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 1374, in __init__
    **_remove_self(locals()))
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 780, in __init__
    'Error opening {0}'.format(self.__class__.__name__))
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 2572, in _check
    raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening OutputStream: Device unavailable [PaErrorCode -9985]

The headset otherwise works, Windows 7 plays audio through it just fine.

I connected a USB headset to listen to a sound made by sounddevice as part of #198, and I got the following error:

Traceback (most recent call last):
  File "foo.py", line 45, in <module>
    play(sample_rate)
  File "foo.py", line 39, in play
    sounddevice.play(array_2, samplerate=hz)
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 154, in play
    **kwargs)
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 2417, in start_stream
    **kwargs)
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 1374, in __init__
    **_remove_self(locals()))
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 780, in __init__
    'Error opening {0}'.format(self.__class__.__name__))
  File "C:Program FilesPython37libsite-packagessounddevice.py", line 2572, in _check
    raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening OutputStream: Device unavailable [PaErrorCode -9985]

The headset otherwise works, Windows 7 plays audio through it just fine.

Выдает ошибку. Понятия не имею что он хочет.

Essdes

+

0

-

0

+

0

-

0

05.04.2017, 07:47

Ошибка открытия звукового устройства. Пожалуйста, проверьте параметры настройки устройства воспроизведения и частоту дискретизации проекта.

+

6

-

2

05.04.2017, 13:28

Для решения данной проблемы вам необходимо выполнить следующее:

1. Откройте панель управления (Пуск → Панель управления)
2. Откройте настройки Звука (Оборудование и звук → Звук → Управление звуковыми устройствами)
3. Перейдите во вкладку Запись.
4. Правой кнопкой мыши нажмите по пустой области и выберите «Показать отключенные устройства».
5. Если не появится никаких новых устройств, то настоятельно рекомендую установить или обновить текущие драйвера на вашу звуковую карту.
6. Если новое устройство появилось, то нажмите по нему правой кнопкой мыши и выберите настройки.
7. В строке «Применение устройства» выберите «Использовать это устройство (вкл.)».
8. Нажимайте ОК пока не закроете все окна. Перезапустите программу Audacity.
9. Ошибка должна исчезнуть.

+

0

-

1

18.04.2021, 04:23

Советы — хрень. У меня нет ни использовать устройство, ни оборудование и звук.

Вопрос и ответы были вам полезны?


Да


Нет

Попробуйте также:

Thank you for your swift answer!

I’ve tried your suggestion. Unfortunately, I get the standard «api not found» exception, as follows:

Traceback (most recent call last):
  File "C:[...]libsite-packagesaudiolazylazy_io.py", line 196, in __init__
    self.api = next(el for el in apis_gen
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/[...]/audiolazy_master/examples/io_wire.py", line 45, in <module>
    with AudioIO(True, api="yamaha") as pr: # A player-recorder
  File "C:[...]libsite-packagesaudiolazylazy_io.py", line 199, in __init__
    raise RuntimeError("API '{}' not found".format(api))
RuntimeError: API 'yamaha' not found

Process finished with exit code 1

As for other devices, here is what PyAudio spits out:

{'defaultLowInputLatency': 0.09, 'structVersion': 2, 'maxOutputChannels': 0, 'index': 0, 'defaultHighInputLatency': 0.18, 'defaultLowOutputLatency': 0.09, 'name': 'Microsoft Soundmapper - Input', 'defaultHighOutputLatency': 0.18, 'maxInputChannels': 2, 'defaultSampleRate': 44100.0, 'hostApi': 0}
{'defaultLowInputLatency': 0.09, 'structVersion': 2, 'maxOutputChannels': 0, 'index': 1, 'defaultHighInputLatency': 0.18, 'defaultLowOutputLatency': 0.09, 'name': 'Line (Steinberg CI1)', 'defaultHighOutputLatency': 0.18, 'maxInputChannels': 2, 'defaultSampleRate': 44100.0, 'hostApi': 0}
{'defaultLowInputLatency': 0.09, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 2, 'defaultHighInputLatency': 0.18, 'defaultLowOutputLatency': 0.09, 'name': 'Microsoft Soundmapper - Output', 'defaultHighOutputLatency': 0.18, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 0}
{'defaultLowInputLatency': 0.09, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 3, 'defaultHighInputLatency': 0.18, 'defaultLowOutputLatency': 0.09, 'name': 'Line (Steinberg CI1)', 'defaultHighOutputLatency': 0.18, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 0}
{'defaultLowInputLatency': 0.09, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 4, 'defaultHighInputLatency': 0.18, 'defaultLowOutputLatency': 0.09, 'name': 'Digitalaudio (S/PDIF) (High Def', 'defaultHighOutputLatency': 0.18, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 0}
{'defaultLowInputLatency': 0.09, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 5, 'defaultHighInputLatency': 0.18, 'defaultLowOutputLatency': 0.09, 'name': 'Digitalaudio (S/PDIF) (High Def', 'defaultHighOutputLatency': 0.18, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 0}
{'defaultLowInputLatency': 0.12, 'structVersion': 2, 'maxOutputChannels': 0, 'index': 6, 'defaultHighInputLatency': 0.24, 'defaultLowOutputLatency': 0.0, 'name': 'Primärer Soundaufnahmetreiber', 'defaultHighOutputLatency': 0.0, 'maxInputChannels': 2, 'defaultSampleRate': 44100.0, 'hostApi': 1}
{'defaultLowInputLatency': 0.12, 'structVersion': 2, 'maxOutputChannels': 0, 'index': 7, 'defaultHighInputLatency': 0.24, 'defaultLowOutputLatency': 0.0, 'name': 'Line (Steinberg CI1)', 'defaultHighOutputLatency': 0.0, 'maxInputChannels': 2, 'defaultSampleRate': 44100.0, 'hostApi': 1}
{'defaultLowInputLatency': 0.0, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 8, 'defaultHighInputLatency': 0.0, 'defaultLowOutputLatency': 0.12, 'name': 'Primärer Soundtreiber', 'defaultHighOutputLatency': 0.24, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 1}
{'defaultLowInputLatency': 0.0, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 9, 'defaultHighInputLatency': 0.0, 'defaultLowOutputLatency': 0.12, 'name': 'Line (Steinberg CI1)', 'defaultHighOutputLatency': 0.24, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 1}
{'defaultLowInputLatency': 0.0, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 10, 'defaultHighInputLatency': 0.0, 'defaultLowOutputLatency': 0.12, 'name': 'Digitalaudio (S/PDIF) (High Definition Audio-Gerät)', 'defaultHighOutputLatency': 0.24, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 1}
{'defaultLowInputLatency': 0.0, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 11, 'defaultHighInputLatency': 0.0, 'defaultLowOutputLatency': 0.12, 'name': 'Digitalaudio (S/PDIF) (High Definition Audio-Gerät)', 'defaultHighOutputLatency': 0.24, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 1}
{'defaultLowInputLatency': 0.0014512471655328798, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 12, 'defaultHighInputLatency': 0.0014512471655328798, 'defaultLowOutputLatency': 0.0014512471655328798, 'name': 'Yamaha Steinberg USB ASIO', 'defaultHighOutputLatency': 0.0014512471655328798, 'maxInputChannels': 2, 'defaultSampleRate': 44100.0, 'hostApi': 2}
{'defaultLowInputLatency': 0.005011337868480726, 'structVersion': 2, 'maxOutputChannels': 0, 'index': 13, 'defaultHighInputLatency': 0.02, 'defaultLowOutputLatency': 0.005011337868480726, 'name': 'ZOOM H and F Series ASIO', 'defaultHighOutputLatency': 0.02, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 2}
{'defaultLowInputLatency': 0.0, 'structVersion': 2, 'maxOutputChannels': 0, 'index': 14, 'defaultHighInputLatency': 0.0, 'defaultLowOutputLatency': 0.0, 'name': 'ZOOM H and F Series Multi ASIO', 'defaultHighOutputLatency': 0.0, 'maxInputChannels': 0, 'defaultSampleRate': 0.0, 'hostApi': 2}
{'defaultLowInputLatency': 0.0, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 15, 'defaultHighInputLatency': 0.0, 'defaultLowOutputLatency': 0.003, 'name': 'Line (Steinberg CI1)', 'defaultHighOutputLatency': 0.01, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 3}
{'defaultLowInputLatency': 0.0, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 16, 'defaultHighInputLatency': 0.0, 'defaultLowOutputLatency': 0.003, 'name': 'Digitalaudio (S/PDIF) (High Definition Audio-Gerät)', 'defaultHighOutputLatency': 0.0101587, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 3}
{'defaultLowInputLatency': 0.0, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 17, 'defaultHighInputLatency': 0.0, 'defaultLowOutputLatency': 0.003, 'name': 'Digitalaudio (S/PDIF) (High Definition Audio-Gerät)', 'defaultHighOutputLatency': 0.0101587, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 3}
{'defaultLowInputLatency': 0.003, 'structVersion': 2, 'maxOutputChannels': 0, 'index': 18, 'defaultHighInputLatency': 0.01, 'defaultLowOutputLatency': 0.0, 'name': 'Line (Steinberg CI1)', 'defaultHighOutputLatency': 0.0, 'maxInputChannels': 2, 'defaultSampleRate': 44100.0, 'hostApi': 3}
{'defaultLowInputLatency': 0.01, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 19, 'defaultHighInputLatency': 0.04, 'defaultLowOutputLatency': 0.01, 'name': 'SPDIF Out (HD Audio-SPDIF-Ausgabe 5)', 'defaultHighOutputLatency': 0.04, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 4}
{'defaultLowInputLatency': 0.01, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 20, 'defaultHighInputLatency': 0.04, 'defaultLowOutputLatency': 0.01, 'name': 'SPDIF Out (HD Audio-SPDIF-Ausgabe)', 'defaultHighOutputLatency': 0.04, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 4}
{'defaultLowInputLatency': 0.01, 'structVersion': 2, 'maxOutputChannels': 0, 'index': 21, 'defaultHighInputLatency': 0.08533333333333333, 'defaultLowOutputLatency': 0.01, 'name': 'Line (Steinberg CI1)', 'defaultHighOutputLatency': 0.08533333333333333, 'maxInputChannels': 2, 'defaultSampleRate': 44100.0, 'hostApi': 4}
{'defaultLowInputLatency': 0.01, 'structVersion': 2, 'maxOutputChannels': 2, 'index': 22, 'defaultHighInputLatency': 0.08533333333333333, 'defaultLowOutputLatency': 0.01, 'name': 'Line (Steinberg CI1)', 'defaultHighOutputLatency': 0.08533333333333333, 'maxInputChannels': 0, 'defaultSampleRate': 44100.0, 'hostApi': 4}

If it helps, here are the available host api’s, also according to PyAudio:

{'structVersion': 1, 'deviceCount': 6, 'index': 0, 'defaultInputDevice': 1, 'name': 'MME', 'defaultOutputDevice': 3, 'type': 2}
{'structVersion': 1, 'deviceCount': 6, 'index': 1, 'defaultInputDevice': 6, 'name': 'Windows DirectSound', 'defaultOutputDevice': 8, 'type': 1}
{'structVersion': 1, 'deviceCount': 3, 'index': 2, 'defaultInputDevice': 12, 'name': 'ASIO', 'defaultOutputDevice': 12, 'type': 3}
{'structVersion': 1, 'deviceCount': 4, 'index': 3, 'defaultInputDevice': 18, 'name': 'Windows WASAPI', 'defaultOutputDevice': 15, 'type': 13}
{'structVersion': 1, 'deviceCount': 4, 'index': 4, 'defaultInputDevice': 21, 'name': 'Windows WDM-KS', 'defaultOutputDevice': 22, 'type': 11}

For good measure, I’ve tried those that aren’t ASIO. MME works, Windows DirectSound is mute but does not raise an exception, Windows WASAPI works (distorted/downsampled sound, though), while Windows WDM-KS raises the following exception:

Traceback (most recent call last):
  File "C:/[...]/audiolazy_master/examples/io_wire.py", line 48, in <module>
    pr.play(pr.record())
  File "C:/[...]libsite-packagesaudiolazylazy_io.py", line 328, in record
    **kwargs),
  File "C:/[...]libsite-packagespyaudio.py", line 750, in open
    stream = Stream(self, *args, **kwargs)
  File "C:/[...]libsite-packagespyaudio.py", line 441, in __init__
    self._stream = pa.open(**arguments)
OSError: [Errno -9999] Unanticipated host error

Sorry if I missed anything, or if something I wrote is obvious. I’m still a novice to python and I never had to worry about audio APIs outside of the context of DAWs until now.

I’m trying to implement offline speech recognition using Raspbian Stretch.

I have been trying to do this using Speech Recognizer 3.8.1 in Python.
The recognizer works from the command line, but when attempting to call it through Python using PocketSphinx, it give the error that cannot find sphinx module.

I can issue this command from the command line:

pi@pi:~ $ python -m speech_recognition

And this is what I get:

ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
A moment of silence, please...
Set minimum energy threshold to 275.930088969
Say something!
Got it! Now to recognize it...
You said can you hear me
Say something!

But when I try to run this script: pi@pi:~ $ python talktest.py

I get this:

ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2840
Traceback (most recent call last):
  File "talktest.py", line 13, in <module>
    with m as source: r.adjust_for_ambient_noise(source)
  File "/home/pi/.local/lib/python2.7/site-packages/speech_recognition/__init__.py", line 141, in __enter__
    input=True,  # stream is an input stream
  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 750, in open
    stream = Stream(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 441, in __init__
    self._stream = pa.open(**arguments)
IOError: [Errno -9985] Device unavailable

This is the script!

#!/usr/bin/env python3
PATH="/home/pi/.local/lib/python2.7/site-packages/speech_recognition/pocketsphinx-data/en-US/acoustic-model"

# NOTE: this example requires PyAudio because it uses the Microphone class

import speech_recognition as sr
import os

# obtain audio from the microphone
m = sr.Microphone()
r = sr.Recognizer()
with sr.Microphone() as source:
    with m as source: r.adjust_for_ambient_noise(source)
    with m as source: audio = r.listen(source)
    print("Say something!")
    audio = r.listen(source)
    print(audio())    

# recognize speech using Sphinx
try:
    print("Sphinx thinks you said " + r.recognize_sphinx(audio))
except sr.UnknownValueError:
    print("Sphinx could not understand audio")
except sr.RequestError as e:
    print("Sphinx error; {0}".format(e))

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Код ошибки 998 сбербанк
  • Код ошибки 99000003 пфр сзв тд