Update README.md
Browse files
README.md
CHANGED
@@ -23,10 +23,10 @@ cd WhisperSeg & pip install -r requirements.txt
|
|
23 |
|
24 |
Then in the folder "WhisperSeg", run the following python script:
|
25 |
```python
|
26 |
-
from model import
|
27 |
import librosa
|
28 |
import json
|
29 |
-
segmenter =
|
30 |
|
31 |
sr = 32000
|
32 |
min_frequency = 0
|
@@ -40,12 +40,10 @@ audio, _ = librosa.load( "data/example_subset/Zebra_finch/test_adults/zebra_finc
|
|
40 |
|
41 |
prediction = segmenter.segment( audio, sr = sr, min_frequency = min_frequency, spec_time_step = spec_time_step,
|
42 |
min_segment_length = min_segment_length, eps = eps,num_trials = num_trials )
|
43 |
-
|
44 |
print(prediction)
|
45 |
```
|
46 |
{'onset': [0.01, 0.38, 0.603, 0.758, 0.912, 1.813, 1.967, 2.073, 2.838, 2.982, 3.112, 3.668, 3.828, 3.953, 5.158, 5.323, 5.467], 'offset': [0.073, 0.447, 0.673, 0.83, 1.483, 1.882, 2.037, 2.643, 2.893, 3.063, 3.283, 3.742, 3.898, 4.523, 5.223, 5.393, 6.043], 'cluster': ['zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0']}
|
47 |
|
48 |
-
|
49 |
For more details, please refer to the GitHub repository: https://github.com/nianlonggu/WhisperSeg
|
50 |
|
51 |
## Contact
|
|
|
23 |
|
24 |
Then in the folder "WhisperSeg", run the following python script:
|
25 |
```python
|
26 |
+
from model import WhisperSegmenterFast
|
27 |
import librosa
|
28 |
import json
|
29 |
+
segmenter = WhisperSegmenterFast( "nccratliri/whisperseg-large-ms-ct2", device="cuda" )
|
30 |
|
31 |
sr = 32000
|
32 |
min_frequency = 0
|
|
|
40 |
|
41 |
prediction = segmenter.segment( audio, sr = sr, min_frequency = min_frequency, spec_time_step = spec_time_step,
|
42 |
min_segment_length = min_segment_length, eps = eps,num_trials = num_trials )
|
|
|
43 |
print(prediction)
|
44 |
```
|
45 |
{'onset': [0.01, 0.38, 0.603, 0.758, 0.912, 1.813, 1.967, 2.073, 2.838, 2.982, 3.112, 3.668, 3.828, 3.953, 5.158, 5.323, 5.467], 'offset': [0.073, 0.447, 0.673, 0.83, 1.483, 1.882, 2.037, 2.643, 2.893, 3.063, 3.283, 3.742, 3.898, 4.523, 5.223, 5.393, 6.043], 'cluster': ['zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0', 'zebra_finch_0']}
|
46 |
|
|
|
47 |
For more details, please refer to the GitHub repository: https://github.com/nianlonggu/WhisperSeg
|
48 |
|
49 |
## Contact
|