Comments (3)
can you try to download the model first and then infer?
from emotion2vec.
Can I do that using the modelscope inference pipeline?
This did not work for me
inference_pipeline = pipeline(
task=Tasks.emotion_recognition,
model= '/Users/piotr/Projects/speech-emotion-recognition/emotion2vec_plus_large/model.pt')
from emotion2vec.
I have resolved this problem by downloading the emotion2vec model to local. Here's my code.
import os
import numpy as np
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
mapper = ["angry", "disgust", "fear", "happy", "neutral", "other", "sad", "surprised", "unknown"]
current_directory = os.getcwd()
emotion2vec_path = rf"{current_directory}\emotion2vec"
audio_name = "yuexin"
audio_path = rf"{current_directory}\audio\{audio_name}.wav"
model_path="iic/emotion2vec_base_finetuned"
inference_pipeline = pipeline(
task=Tasks.emotion_recognition,
model=emotion2vec_path
)
rec_result = inference_pipeline(audio_path, granularity="utterance", extract_embedding=False)
max_emotion_score = np.argmax(rec_result[0]["scores"])
print(f"emotion: {mapper[max_emotion_score]}\tconfidence: {rec_result[0]['scores'][max_emotion_score]}")
from emotion2vec.
Related Issues (20)
- Request for test and dev files HOT 2
- 二维码过期了 HOT 1
- extreactfeature won't work with the new models HOT 2
- fine-tuning pre train model HOT 3
- About reproducing data2vec2 results HOT 7
- Optimal segment length HOT 6
- _MISSING_TYPE HOT 7
- RAVDESS test result HOT 1
- The performance of utterance-level features is poor. HOT 5
- 微信群二维码失效 HOT 3
- KeyError: 'text' when inferring with iic/emotion2vec_plus_large model in FunASR HOT 2
- Batching model inference HOT 2
- 微信群能更新吗?又失效了群主 想交流一下 HOT 1
- Fine Tuning the emotion2vec model HOT 4
- miss key in ckpt HOT 2
- The Performance of the new models are bad for specific languages HOT 3
- Request for demo on using emotion2vec with Speech + Text modality HOT 2
- 微信二维码失效了,可以更新你一下吗?谢谢! HOT 3
- extract_features AssertionError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emotion2vec.