semvec/pypi-packages huggingface dataset:
python-cgp 0.0.1
A Python implementation of the correlation based glimpse proportion (CGP) index
Requires Python: >=3.8

# cgp

A Python implementation of the correlation based glimpse proportion (CGP) index proposed in [1] for speech intelligibility prediction.

Supports batched inputs.

# Installation

```
pip install python-cgp
```

# Usage

```python
import cgp
import soundfile as sf

x, fs = sf.read("path/to/input/signal")
y, fs = sf.read("path/to/reference/signal")

z = cgp.cgp(x, y, fs)
```

For batched inputs:
```python
import cgp
import numpy as np
import soundfile as sf

x_1, fs = sf.read("path/to/input/signal/1")
y_1, fs = sf.read("path/to/reference/signal/1")

x_2, fs = sf.read("path/to/input/signal/2")
y_2, fs = sf.read("path/to/reference/signal/2")

# x_1 and x_2 might have different lengths so we pad before creating the batch
lengths = [len(x_1), len(x_2)]
n = max(lengths)
x_1 = np.pad(x_1, (0, n - len(x_1)))
y_1 = np.pad(y_1, (0, n - len(y_1)))
x_2 = np.pad(x_2, (0, n - len(x_2)))
y_2 = np.pad(y_2, (0, n - len(y_2)))

# create the batch
x = np.stack([x_1, x_2])
y = np.stack([y_1, y_2])

# provide the lengths argument to ensure the same result as for unbatched processing
z = cgp.cgp(x, y, fs, axis=1, lengths=lengths)
```

# Note

This implementation corrects an indexing error in the original MATLAB code in `removeSilentFrames.m` which causes the last frame in the voice activity detection stage to be discarded.
This means the results can differ slightly from the original implementation.
To obtain the same results as the original implementation, set the `_discard_last_frame` argument to `True`.

# Speed comparison with `pystoi`

The paper claims CGP takes substantially less time to execute compared to baselines such as ESTOI [2].
Below is a comparison with `pystoi` for unbatched inputs.

TODO

# References

[1] A. Alghamdi, L. Moen, W.-Y. Chan, D. Fogerty and J. Jensen, "Correlation based glimpse proportion index", in Proc. WASPAA, 2023.\
[2] J. Jensen and C. H. Taal, "An algorithm for predicting the intelligibility of speech masked by modulated noise maskers", in IEEE/ACM Trans. Audio, Speech, Lang. Process., 2016.
carburetor 4.5.1
GTK frontend for Tractor
Requires Python: >=3.9
Keywords: Tor,onion,stem

[![Translation status](https://hosted.weblate.org/widgets/carburetor/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/carburetor/?utm_source=widget)

# Carburetor: anonymous browsing made easy
Discover anonymous browsing with Carburetor on your phones and computers. Tailored for GNOME, it's your hidden superhero for online adventures, powered by TOR. Don't get your hands dirty with system files any more – just tap in the app, keeping your online world safe and private. Customize settings if you want, but you don't have to. Carburetor is Free Software and puts you in control. No worries, just enjoy your anonymous browsing!

![Main window of Carburetor](https://tractor.frama.io/images/carburetor-main.png)

Carburetor complies with the [GNOME Code of Conduct](https://wiki.gnome.org/Foundation/CodeOfConduct).

## Install
Carburetor is natively packaged for some distros:

[![Packaging status](https://repology.org/badge/vertical-allrepos/carburetor.svg)](https://repology.org/project/carburetor/versions)

If you're on any other distribution or OS, Tractor team welcomes you to make build recepie of yours.

You can also get it from [Flathub](https://flathub.org/apps/io.frama.tractor.carburetor).

## Run
you can run `carburetor` by command line or through your desktop environment.

## Contribute
Contributing is always appreciated. See [CONTRIBUTING](https://framagit.org/tractor/carburetor/-/blob/main/CONTRIBUTING.md) for more information.