Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Resolve audio CI (#1368)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwharris authored Jun 29, 2022
1 parent e380b02 commit 345c95c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
run: |
sudo apt-get install libsndfile1
pip install matplotlib
pip install '.[audio,image]' --upgrade
pip install '.[audio,image]' torch==1.11.0 --upgrade
- name: Cache datasets
uses: actions/cache@v2
Expand Down
16 changes: 8 additions & 8 deletions flash/audio/speech_recognition/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def from_files(
>>> import numpy as np
>>> import soundfile as sf
>>> samplerate = 44100
>>> data = np.random.uniform(-1, 1, size=(samplerate * 3, 2))
>>> samplerate = 1000
>>> data = np.random.uniform(-1, 1, size=(samplerate, 2))
>>> _ = [sf.write(f"speech_{i}.wav", data, samplerate, subtype='PCM_24') for i in range(1, 4)]
>>> _ = [sf.write(f"predict_speech_{i}.wav", data, samplerate, subtype='PCM_24') for i in range(1, 4)]
Expand Down Expand Up @@ -180,8 +180,8 @@ def from_csv(
>>> import numpy as np
>>> from pandas import DataFrame
>>> import soundfile as sf
>>> samplerate = 44100
>>> data = np.random.uniform(-1, 1, size=(samplerate * 3, 2))
>>> samplerate = 1000
>>> data = np.random.uniform(-1, 1, size=(samplerate, 2))
>>> _ = [sf.write(f"speech_{i}.wav", data, samplerate, subtype='PCM_24') for i in range(1, 4)]
>>> _ = [sf.write(f"predict_speech_{i}.wav", data, samplerate, subtype='PCM_24') for i in range(1, 4)]
>>> DataFrame.from_dict({
Expand Down Expand Up @@ -304,8 +304,8 @@ def from_json(
>>> import numpy as np
>>> from pandas import DataFrame
>>> import soundfile as sf
>>> samplerate = 44100
>>> data = np.random.uniform(-1, 1, size=(samplerate * 3, 2))
>>> samplerate = 1000
>>> data = np.random.uniform(-1, 1, size=(samplerate, 2))
>>> _ = [sf.write(f"speech_{i}.wav", data, samplerate, subtype='PCM_24') for i in range(1, 4)]
>>> _ = [sf.write(f"predict_speech_{i}.wav", data, samplerate, subtype='PCM_24') for i in range(1, 4)]
>>> DataFrame.from_dict({
Expand Down Expand Up @@ -423,8 +423,8 @@ def from_datasets(
>>> import numpy as np
>>> import soundfile as sf
>>> samplerate = 44100
>>> data = np.random.uniform(-1, 1, size=(samplerate * 3, 2))
>>> samplerate = 1000
>>> data = np.random.uniform(-1, 1, size=(samplerate, 2))
>>> _ = [sf.write(f"speech_{i}.wav", data, samplerate, subtype='PCM_24') for i in range(1, 4)]
>>> _ = [sf.write(f"predict_speech_{i}.wav", data, samplerate, subtype='PCM_24') for i in range(1, 4)]
Expand Down

0 comments on commit 345c95c

Please sign in to comment.