semvec/pypi-packages huggingface dataset:
pych9329 0.1.6
Python module to control the ch9329
License: MIT
Requires Python: >3.10

# pych9329
Python module to control ch9329

## Installation

You can install the package via pip:

```bash
pip install pych9329
```

## Usage

### Quick start

```py
import time

from serial import Serial

from pych9329 import chip_command
from pych9329 import keyboard
from pych9329 import mouse


def main():
    ser = Serial("COM10", 9600, timeout=0.5)

    # Receive the keyboard lock status
    result, kb_status = keyboard.receive_indicator_status(ser)
    if result:
        # {'usb_connect_status': True, 'num_lock': True, 'caps_lock': False, 'scroll_lock': False}
        print(kb_status)
        # Automatically turn off caps_lock
        if kb_status["caps_lock"]:
            keyboard.click(ser, "caps_lock")

    # Click the "Win + D" key combination
    # First press the 2 buttons at the same time
    # For optional parameters of modifiers, please refer to keyboard.MODIFIER_KEY_NAME_MAP
    keyboard.trigger(ser, ["D"], ["win"])
    # Usually there is a 10 millisecond interval between pressing a key and popping it up.
    # Simulate this behavior with sleep
    time.sleep(0.1)
    # Pop up all keys
    keyboard.trigger(ser, [""], [""])

    # Click a single key
    keyboard.click(ser, "a")
    keyboard.click(ser, "A")
    # Send text
    keyboard.send_text(ser, "\n")
    keyboard.send_text(ser, "Hello World\n")
    keyboard.send_text(ser, "abcdefghijklmnopqrstuvwxyz\n")
    keyboard.send_text(ser, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n")
    keyboard.send_text(ser, "0123456789\n")
    keyboard.send_text(ser, "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\n")

    # Move the mouse
    mouse.move(ser, x=500, y=500)
    mouse.move(ser, x=50, y=50, relative_mode=True)
    # Click a button
    # For supported key names, please see mouse.MOUSE_BUTTON_NAME_MAP
    mouse.click(ser, button_name="left")

    # 2019A152BB40
    print(chip_command.get_serial_number(ser))
    # WCH UART TO KB-MS_V1.8
    print(chip_command.get_product(ser))
    # WWW.WCH.CN
    print(chip_command.get_manufacturer(ser))

    ser.close()


if __name__ == "__main__":
    main()

```

### Example
More example please check the example directory.

## License

MIT license.

## Contributing

This project is modified from ch9329 library.

Thanks to the original author of the ch9329 library [Pradish Bijukchhe](https://github.com/pradishb)
epanns 0.1.5
Categorise sounds within an audio file
License: MIT
Requires Python: >=3.9

# epanns

`epanns` is a tool for categorising sound within an audio file. It is uses the [E-PANNs](https://github.com/Arshdeep-Singh-Boparai/E-PANNs) lightweight pre-trained model developed by Arshdeep Singh at the University of Surrey. Sounds are categorised using the [Google AudioSet ontology](https://research.google.com/audioset/ontology/index.html).

## Command-line usage

Use [pipx](https://pipx.pypa.io/stable/) to install it as a CLI tool
```
pipx install epanns
```

Running the following
```
epanns /path/to/audio.wav
```
will return the predicted categories and their probability as JSON
```
[
  [
    "Speech",
    0.7508
  ],
  [
    "Inside, small room",
    0.0186
  ],
  [
    "Computer keyboard",
    0.0145
  ]
]
```

To see the available options, run `epanns --help`

If you do not provide a checkpoint path, the [model checkpoint](https://zenodo.org/records/7939403) will be downloaded on the first run and cached for future runs.

## Library usage

Use [pip](https://pip.pypa.io/en/stable/) to install
```
pip install epanns
```

Calling it as a library
```
from epanns.predict import predict
top_preds = predict('/path/to/audio.wav')
print(top_preds)
```
will return a list of tuples for the top predictions
```
[
  ('Speech', 0.7508),
  ('Inside, small room', 0.0186),
  ('Computer keyboard', 0.0145)
]
```

## Acknowledgements

This software is based on the following research. Please cite these papers:

- Arshdeep Singh, Haohe Liu and Mark D PLumbley. "E-PANNS: Sound Recognition using Efficient Pre-Trained Audio Neural Networks", accepted in Internoise 2023.

- Singh, Arshdeep, and Mark D. Plumbley. "Efficient CNNs via Passive Filter Pruning." arXiv preprint arXiv:2304.02319 (2023). 

- Qiuqiang Kong, Yin Cao, Turab Iqbal, Yuxuan Wang, Wenwu Wang, Mark D. Plumbley. "PANNs: Large-Scale Pretrained Audio Neural Networks for Audio Pattern Recognition." arXiv preprint arXiv:1912.10211 (2019).

The research was supported by Engineering and Physical Sciences Research Council (EPSRC) Grant EP/T019751/1 “AI for Sound (AI4S)”. Project link:  https://ai4s.surrey.ac.uk/

## Related links

* https://research.google.com/audioset/dataset
* https://github.com/qiuqiangkong/audioset_tagging_cnn
* https://github.com/qiuqiangkong/panns_inference
* https://github.com/yinkalario/Sound-Event-Detection-AudioSet


## License

[MIT](https://choosealicense.com/licenses/mit/)