Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EN/FF: Various changes to the Microphone class #3724

Merged
merged 12 commits into from
May 6, 2021

Conversation

mdcutone
Copy link
Member

@mdcutone mdcutone commented Apr 9, 2021

Some fixes and changes as listed here:

  • Removed volume setting from Microphone class. Doesn't work anyways but didn't raise errors originally.
  • Added audio latency mode. Default value comes from prefs but the user can specify a value to override.
  • Added logging to various events during the creation and use of the class.
  • Some doc changes.

@codecov
Copy link

codecov bot commented Apr 9, 2021

Codecov Report

Merging #3724 (e1b394b) into dev (4af5470) will decrease coverage by 0.04%.
The diff coverage is 10.00%.

❗ Current head e1b394b differs from pull request most recent head 75141c9. Consider uploading reports for the commit 75141c9 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #3724      +/-   ##
==========================================
- Coverage   43.57%   43.52%   -0.05%     
==========================================
  Files         274      274              
  Lines       53828    53777      -51     
  Branches     9223     9221       -2     
==========================================
- Hits        23454    23409      -45     
+ Misses      28023    28018       -5     
+ Partials     2351     2350       -1     
Impacted Files Coverage Δ
psychopy/sound/microphone.py 33.60% <10.00%> (-1.04%) ⬇️
...chopy/experiment/components/microphone/__init__.py 91.93% <0.00%> (-2.41%) ⬇️
psychopy/experiment/components/_base.py 66.22% <0.00%> (+0.26%) ⬆️
...sychopy/experiment/components/settings/__init__.py 73.59% <0.00%> (+0.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4af5470...75141c9. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 47.245% when pulling e1b394b on mdcutone:dev-microphone-remove-volume into 39c92f2 on psychopy:dev.

@coveralls
Copy link

coveralls commented Apr 9, 2021

Coverage Status

Coverage decreased (-0.008%) to 47.254% when pulling e1b394b on mdcutone:dev-microphone-remove-volume into 39c92f2 on psychopy:dev.

@isolver
Copy link
Contributor

isolver commented Apr 12, 2021

In the warning:
Text-to-speech recognition module not available it might be good to give the name of the python package that needs to be installed, or tell them to pip install SpeechRecognition

@isolver
Copy link
Contributor

isolver commented Apr 12, 2021

the coder\input\latencyFromTone.py demo no longer runs.

Traceback (most recent call last):
  File "D:/DEV/my-code/psychopy/psychopy/demos/coder/input/latencyFromTone.py", line 38, in <module>
    names, idx = sound.backend.get_input_devices()
AttributeError: module 'psychopy.sound.backend_ptb' has no attribute 'get_input_devices'

Not sure if this dmeo should be fixed or changed to be a demo / test of the new recording functionality.

@isolver
Copy link
Contributor

isolver commented Apr 12, 2021

Update: Using Audacity I can record audio at normal volume fine, so it seems that the latest mic update records with very low input levels. Maybe the volume code was doing something?

@TEParsons
Copy link
Contributor

Mine is a little quiet too - quieter than when recording from current dev branch

@mdcutone
Copy link
Member Author

Makes no sense why this would be happening. The volume code wasn't there before and it worked fine.

mdcutone added 2 commits April 12, 2021 11:26
…e-volume

# Conflicts:
#	psychopy/sound/microphone.py
@mdcutone
Copy link
Member Author

Okay seemed to be a problem with the WASAPI driver not working well with audio latency classes other than zero.

@peircej peircej merged commit 1d85e7d into psychopy:dev May 6, 2021
@mdcutone mdcutone deleted the dev-microphone-remove-volume branch June 23, 2022 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants