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

AttributeError: module 'opensmile' has no attribute 'Smail' #15

Open
sumhncku opened this issue Jan 26, 2021 · 14 comments
Open

AttributeError: module 'opensmile' has no attribute 'Smail' #15

sumhncku opened this issue Jan 26, 2021 · 14 comments

Comments

@sumhncku
Copy link

I try the code like below,
`import opensmile

smile = opensmile.Smail(
feature_set=opensmile.FeatureSet.ComParE_2016,
feature_level=opensmile.FeatureLevel.Functionals,
)
y = smile.process_file('wav/03a01Fa.wav')`
But get the attributeError,
How can I fix this error?
Thanks.

@hagenw
Copy link
Member

hagenw commented Jan 26, 2021

Hi, you have a small typo. It should be smile = opensmile.Smile(...) not smile = opensmile.Smail(...).

@nmehjabin
Copy link

I try the code like below, `import opensmile

smile = opensmile.Smail( feature_set=opensmile.FeatureSet.ComParE_2016, feature_level=opensmile.FeatureLevel.Functionals, ) y = smile.process_file('wav/03a01Fa.wav')` But get the attributeError, How can I fix this error? Thanks.

I am having the same problem but for me it says

AttributeError Traceback (most recent call last)
Cell In[3], line 2
1 import opensmile
----> 2 smile = opensmile.Smile(
3 feature_set=opensmile.FeatureSet.ComParE_2016,
4 feature_level=opensmile.FeatureLevel.Functionals,
5 )

AttributeError: module 'opensmile' has no attribute 'Smile'

@nmehjabin
Copy link

nmehjabin commented Jul 20, 2023

I try the code like below, `import opensmile

smile = opensmile.Smail( feature_set=opensmile.FeatureSet.ComParE_2016, feature_level=opensmile.FeatureLevel.Functionals, ) y = smile.process_file('wav/03a01Fa.wav')` But get the attributeError, How can I fix this error? Thanks.

Hi, I wanted to ask have you ever occurred with this problem where it gives you the same error but the code is right. I would appreciate any help. Thanks.

import opensmile
smile = opensmile.Smile(
feature_set=opensmile.FeatureSet.ComParE_2016,
feature_level=opensmile.FeatureLevel.Functionals,
)

AttributeError Traceback (most recent call last)
Cell In[4], line 2
1 import opensmile
----> 2 smile = opensmile.Smile(
3 feature_set=opensmile.FeatureSet.ComParE_2016,
4 feature_level=opensmile.FeatureLevel.Functionals,
5 )

AttributeError: module 'opensmile' has no attribute 'Smile'
y = smile.process_file('~/Desktop/Harvard\ list\ 01.wav')

@hagenw
Copy link
Member

hagenw commented Jul 20, 2023

The code should work without error. Could you check which version you are using, e.g.

>>> import opensmile

>>> opensmile.__version__
'2.4.1'

@nmehjabin
Copy link

I was having OS error and I had to fix that first. So I have condo environment for arch x64 as I am running on Mac. I think I am having installation problem.
I did pip install opensmilethen when I tried to import opensmile error occurs:

(env_x86) nadiamehjabin@Nadias-MacBook-Air ~ % python
Python 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:10:28) [Clang 15.0.7 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import opensmile
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'opensmile'

@hagenw
Copy link
Member

hagenw commented Jul 21, 2023

Could you paste the output of the following commands:

import platform

print(platform.system())
print(platform.machine())

And try if you can install it with pip, e.g.

virtualenv venv
source venv/bin/activate
pip install opensmile
python -c "import opensmile"

@nmehjabin
Copy link

Could you paste the output of the following commands:

import platform

print(platform.system())
print(platform.machine())

I did this on my condo base which gives me this:
`
(base) nadiamehjabin@Nadias-MacBook-Air ~ % python
Python 3.10.9 (main, Mar 1 2023, 12:20:14) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information.

›> import platform
›> print (platform.system () )
Darwin
›>> print (platform.machine ( ))
arm64`

And I also did in my condo X86 env:
[ (env_×86) nadiamehjabin@Nadias-MacBook-Air ~ % python Python 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:10:28) [Clang 15.0.7 ] on darwin Type "help", "copyright" "credits" or "license" for more information. [››> import platform [›>> print (platform.system () ) Darwin [›>> print (platform. machine () ) ×86_64

And try if you can install it with pip, e.g.

virtualenv venv
source venv/bin/activate
pip install opensmile
python -c "import opensmile"

I think the import opensmile is working. So when I write the example code:
`
(env) (env_x86) nadiamehjabin@Nadias-MacBook-Air ~ % python
Python 3.10.11 (v3.10.11:7d4cc5aa85, Apr 4 2023, 19:05:19) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import opensmile
smile = opensmile.Smile(
... feature_set=opensmile.FeatureSet.ComParE_2016,
... feature_level=opensmile.FeatureLevel.Functionals,
... )
y = smile.process_file('~/Desktop/Harvard_list_01.wav')
print(y)
audspec_lengthL1norm_sma_range ... mfcc_sma_de[14]_stddevFallingSlope
file start end ...
~/Desktop/Harvard_list_01.wav 0 days 0 days 00:01:07.669333333 1.023855 ... 58.550488

[1 rows x 6373 columns]
`

@hagenw
Copy link
Member

hagenw commented Jul 25, 2023

arm64, this indicates you are not on a x64 architecture, but have a M1 Mac. This architecture is not yet supported, compare #78.

@nmehjabin
Copy link

nmehjabin commented Jul 25, 2023 via email

@hagenw
Copy link
Member

hagenw commented Jul 25, 2023

The M1 architecture of your Mac is not supported, which means there is no way you can use the software until #78 is implemented on our side. My hope is that we finish this during the next two month.

The alternative would be to compile opensmile yourself from sources, but there might also be issues with that, compare audeering/opensmile#61.

@hagenw
Copy link
Member

hagenw commented Oct 19, 2023

Since release 2.5.0 we now support M1. Could you try to update your installation of opensmile and try again?

@zargo-zm
Copy link

zargo-zm commented Jul 9, 2024

I try the code like below, import opensmile smile = opensmile.Smail( feature_set=opensmile.FeatureSet.ComParE_2016, feature_level=opensmile.FeatureLevel.Functionals, ) y = smile.process_file('wav/03a01Fa.wav') But get the attributeError, How can I fix this error? Thanks.

I am having the same problem but for me it says

AttributeError Traceback (most recent call last) Cell In[3], line 2 1 import opensmile ----> 2 smile = opensmile.Smile( 3 feature_set=opensmile.FeatureSet.ComParE_2016, 4 feature_level=opensmile.FeatureLevel.Functionals, 5 )

AttributeError: module 'opensmile' has no attribute 'Smile'

I met the same problem,and I found the code isn't working in Windows system but Linux system. This should be the problem

@hagenw
Copy link
Member

hagenw commented Jul 9, 2024

As the code is working with the Windows version in the Github runners, could you please specify which exact version of Windows you are using, and on which architecture/PC you are running it.

@zargo-zm
Copy link

zargo-zm commented Jul 9, 2024

I am using my laptop, it is DELL G3 and the Windows version is Win11 Home Edition. The test python file is running at pycharm2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants