Giter Club home page Giter Club logo

azure-percept-py's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

va2ron1 harryliou

azure-percept-py's Issues

Simulation mode

Add a simulation flag so that the code can also be used (and tested) on servers without an actual Percept.

Mutualise FFmpeg builds with PyAV project?

Hi @christian-vorhemus !

Following up on the discussion in pypa/auditwheel#354 I was wondering whether it would make sense to pool our resources to maintain FFmpeg builds for Python projects.

To be more specific, in order to cut down on the build time for PyAV wheels for Linux / Mac / Windows, I maintain this:

https://github.com/PyAV-Org/pyav-ffmpeg

These are builds of FFmpeg + its dependencies, built via cibuildwheel to ensure they are using the exact toolchains required for linking them in Python wheels. The output is a tarball per platform contain include and lib directories.

Windows is a special case, I have not (yet?) been able to compile FFmpeg and its dependencies from source, so I rely on third party builds.

Any thoughts?

Azure Ear: usb.core.USBTimeoutError: [Errno 110] Operation timed out on Device Authentication

When I install the device, I always get "Operation time out"

  1. I connect the USB
  2. I allow udev access by adding SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="0673", MODE="666" and reloading it
  3. I run the Azure Ear example

Stack:

โžœ python azure-percept-test.py
Authenticating sensor...
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/user/.pyenv/versions/3.8.12/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/user/.pyenv/versions/3.8.12/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/.pyenv/versions/3.8.12/lib/python3.8/site-packages/azure/iot/percept/_device_authentication.py", line 94, in start_authentication
    read_msg = dev.read(self.read_endpoint, 5120)
  File "/home/user/.pyenv/versions/3.8.12/lib/python3.8/site-packages/usb/core.py", line 1029, in read
    ret = fn(
  File "/home/user/.pyenv/versions/3.8.12/lib/python3.8/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
    return self.__read(self.lib.libusb_bulk_transfer,
  File "/home/user/.pyenv/versions/3.8.12/lib/python3.8/site-packages/usb/backend/libusb1.py", line 954, in __read
    _check(retval)
  File "/home/user/.pyenv/versions/3.8.12/lib/python3.8/site-packages/usb/backend/libusb1.py", line 602, in _check
    raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out

Allow multi-tensor output

Currently the library only supports nets with one tensor as output. Support for multi-tensor outputs should be added.

Myriad logs are polluting stdout

It seems like the debug level set on the myriad library is set to INFO which results in a lot of logging messages that are put to standard out. It would be cleaner if only errors or critical messages would be shown (potentially on stderr) or - even better - letting the user set the log level.

Memory leaks

There are memory leaks detected using tracemalloc and psutil.Process(os.getpid()). Goal of this issue is to diagnose them further and fix them eventually.

Stopping Recording without Closing File creates invalid file

When I create a .wav file but don't close the device (just call stop_recording) the file created is invalid:

formats: can't open input file `./sample.wav': WAVE: RIFF header not found
RuntimeError: Error loading audio file: failed to open file ./sample.wav

Example Code:

audio = AudioDevice()

print("Authenticating sensor...")
while True:
    if audio.is_ready() is True:
        break
    else:
        time.sleep(1)

print("Authentication successful!")

while True:
    audio.start_recording("./sample.wav")
    time.sleep(1)
    audio.stop_recording() # Closes WAV file

# Don't call this to simulate problem
# audio.close()

Reference:

def stop_recording(self):

Explanation of how to do this without the library

Hi!

Thanks a lot for creating this, amazing that we can use all the sensors this easily!

Currently I am working on a project, but I would love to learn more on how you enabled the Azure ear audio recording. Could you explain in a bit more detail how the audio recording works in this library? Is there a way to do this easily ourselves or do we need to use this library?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.