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

Add support for audio in array format #41

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
22612ee
Merge commit '9c64d5b08d39c44e513de5df9dbc554b6e5afc28' into dev
g8a9 Apr 30, 2023
c8dd6e1
Merge branch 'main' into dev
g8a9 Mar 6, 2024
e5dc297
[WIP] initial implementation to support audio processing as arrays
g8a9 Mar 6, 2024
ed15ea1
proposed changes to integrate numpy arrays
gaiageagea Mar 15, 2024
2ff3f2a
Attach console handler to logger, fix bugs, move audio transcription …
Mar 15, 2024
721beb2
implementing comments, using FerretAudio homogeneously across explain…
gaiageagea Mar 15, 2024
d550900
Adapt faithfulness measures for speech to use FerretAudio objects, fi…
Mar 18, 2024
3eea1bd
Fix conversion of array to pydub type
Mar 19, 2024
87e9076
- Add a new "transcribe" method
g8a9 Mar 19, 2024
bd9b5fa
- added some dependencies
g8a9 Mar 19, 2024
fa78095
Everything works with no coding errors on the new notebooks.
g8a9 Mar 19, 2024
cb92e14
update readme
g8a9 Mar 19, 2024
aab3360
update readme
g8a9 Mar 19, 2024
6660ac5
update readme
g8a9 Mar 19, 2024
8853e00
removing remove_word_np and its occurrences
gaiageagea Mar 20, 2024
0c50e85
changing equal width explainers to calculate the duration of the audi…
gaiageagea Mar 20, 2024
4e157ef
Make sure to use normalized arrays in the evaluators for speech
Mar 21, 2024
14d9a33
Fix notebook
Mar 21, 2024
ebd9930
Update notebooks
Mar 21, 2024
4ff1c2b
Iron out minor details (use normalized arrays in all the speech expla…
Mar 27, 2024
4d46242
Merge pull request #40 from g8a9/feat/support-speech-from-array
emanuele-moscato Mar 27, 2024
282fc63
Fix log printing
Mar 27, 2024
a8e5b1a
Merge pull request #42 from g8a9/fix-logs
emanuele-moscato Mar 27, 2024
38386c0
Fix dependency in github workflow
Mar 27, 2024
0337244
Merge pull request #43 from g8a9/fix-logs
emanuele-moscato Mar 27, 2024
2fef1e7
Fix dependency
Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/flake8-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
python -m pip install flake8 pytest poetry
# poetry install --all-extras
pip install -e .[all]
pip install git+https://github.com/m-bain/whisperx.git
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,23 @@ For the default installation, which does **not** include the dependencies for th
pip install -U ferret-xai
```

Our main dependencies are 🤗 `tranformers` and `datasets`.
**Troubleshoothing**

If the speech XAI functionalities are needed, then

```
pip install -U ferret-xai[speech]
```

At the moment, the speech XAI-related dependencies are the only extra ones, so installing with `ferret-xai[speech]` or `ferret-xai[all]` is equivalent.

**Important** Some of our dependencies might use the package name for `scikit-learn` and that breaks ferret installation. \
Some of our dependencies might use the package name for `scikit-learn` and that breaks ferret installation. \
If your pip install command fails, try:

```bash
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True pip install -U ferret-xai
```

This is hopefully a temporary situation!
### (Optional) Install XAI Speech functionalities

If the speech XAI functionalities are needed, then follow these steps:

1. install the library with: `pip install -U ferret-xai[speech]` or `pip install -U ferret-xai[all]`
2. install whisperX with `pip install git+https://github.com/m-bain/whisperx.git`
3. install system-wide [ffmpeg](https://ffmpeg.org/download.html). If you have no sudo rights, you can try with `conda install conda-forge::ffmpeg`


### Explain & Benchmark

Expand Down
Loading
Loading