OpenAdapt icon indicating copy to clipboard operation
OpenAdapt copied to clipboard

feat: add audio narration (updated)

Open angelala3252 opened this issue 2 years ago • 5 comments

Summary

Updated version of PR #195 due to deleting previous fork. This feature is blocked until MacOS accessibility issues are fixed.

(Addresses https://github.com/OpenAdaptAI/OpenAdapt/issues/164)

Checklist

  • [x] My code follows the style guidelines of OpenAdapt
  • [x] I have performed a self-review of my code
  • [x] If applicable, I have added tests to prove my fix is functional/effective
  • [x] I have linted my code locally prior to submission
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation (e.g. README.md, requirements.txt)
  • [x] New and existing unit tests pass locally with my changes

angelala3252 avatar Jul 03 '23 20:07 angelala3252

@0dm can you please comment about what would be required to get an analogous implementation of this for Mac? 🙏

abrichr avatar Aug 24 '23 18:08 abrichr

@0dm can you please comment about what would be required to get an analogous implementation of this for Mac? 🙏

The issue with not being able to capture audio with openadapt.record running should be fixed after the changes in _macos a while ago.

0dm avatar Aug 24 '23 22:08 0dm

@angelala3252 can you please fix merge commits? I believe you will need to re-generate the alembic scripts as well.

Please also confirm this works with poetry. After checking out your branch and running poetry install followed by python -m openadapt.record foo --enable_audio, I get:


Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/Cellar/[email protected]/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/abrichr/oa/src/OpenAdapt/openadapt/record.py", line 27, in <module>
    import sounddevice
ModuleNotFoundError: No module named 'sounddevice'

abrichr avatar Aug 30 '23 20:08 abrichr

After pulling from main, for some reason importing sounddevice breaks recordings. I can record audio just fine, but nothing else can be recorded and no window events can be registered and the recording hangs indefinitely after Ctrl+C. This even happens when I'm not recording audio and I can't figure out why. I'm using the same version (0.4.6) I was when everything still worked.

angelala3252 avatar Aug 31 '23 11:08 angelala3252

@angelala3252 this may be due to openadapt.capture

@0dm any ideas? 🙏

abrichr avatar Mar 02 '24 23:03 abrichr

Implemented in https://github.com/OpenAdaptAI/OpenAdapt/pull/673

@angelala3252 thank you for blazing the trail here!! 🙏

abrichr avatar Jun 18 '24 03:06 abrichr