Update README.md
This commit is contained in:
parent
696c23195e
commit
7fd191edd9
10
README.md
10
README.md
|
@ -30,7 +30,7 @@ import pandas as pd
|
||||||
~~~
|
~~~
|
||||||
~~~
|
~~~
|
||||||
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
||||||
model_name_or_path = "Bagus/wav2vec2-xlsr-greek-speech-emotion-recognition"
|
model_name_or_path = "harshit345/xlsr-wav2vec-speech-emotion-recognition"
|
||||||
config = AutoConfig.from_pretrained(model_name_or_path)
|
config = AutoConfig.from_pretrained(model_name_or_path)
|
||||||
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(model_name_or_path)
|
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(model_name_or_path)
|
||||||
sampling_rate = feature_extractor.sampling_rate
|
sampling_rate = feature_extractor.sampling_rate
|
||||||
|
@ -59,10 +59,10 @@ path = '/data/jtes_v1.1/wav/f01/ang/f01_ang_01.wav'
|
||||||
outputs = predict(path, sampling_rate)
|
outputs = predict(path, sampling_rate)
|
||||||
~~~
|
~~~
|
||||||
~~~
|
~~~
|
||||||
[{'Emotion': 'anger', 'Score': '98.3%'},
|
[{'Emotion': 'anger', 'Score': '78.3%'},
|
||||||
{'Emotion': 'disgust', 'Score': '0.0%'},
|
{'Emotion': 'disgust', 'Score': '11.7%'},
|
||||||
{'Emotion': 'fear', 'Score': '0.4%'},
|
{'Emotion': 'fear', 'Score': '5.4%'},
|
||||||
{'Emotion': 'happiness', 'Score': '0.7%'},
|
{'Emotion': 'happiness', 'Score': '4.1%'},
|
||||||
{'Emotion': 'sadness', 'Score': '0.5%'}]
|
{'Emotion': 'sadness', 'Score': '0.5%'}]
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue