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

TypeError: create() got an unexpected keyword argument 'access_key' #242

Closed
printmanpro opened this issue Dec 22, 2021 · 7 comments
Closed
Assignees
Labels
question Further information is requested

Comments

@printmanpro
Copy link

import pvporcupine

access_key = "my access key"

handle = pvporcupine.create(access_key=access_key, keywords=['picovoice'])

When I run this python code , or any of the python demos i get this error

TypeError: create() got an unexpected keyword argument 'access_key'

I have checked and key-check the access key is correct..
Any help?

@kenarsa kenarsa self-assigned this Dec 22, 2021
@kenarsa
Copy link
Member

kenarsa commented Dec 22, 2021

@printmanpro you need to provide more information. What is the OS? What is the version of pvporcupine and pvporcupinedemo?

@printmanpro
Copy link
Author

printmanpro commented Dec 23, 2021

Hi..
OS is Raspbian Bullseye
pvporcupine 2.0.4
pvporcupinedemo 2.0.3

@printmanpro
Copy link
Author

Another update..
This command " picovoice_demo_mic --show_audio_devices " fails with an error because it requires an access key.
If I include the access key I can view the audio devices..

@kenarsa
Copy link
Member

kenarsa commented Dec 23, 2021

I just tried the demo on a Raspberry Pi 3 and it worked fine for me. Can you please provide the command you are entering and I try it just like that (exclude your ACCESS_KEY argument)

@kenarsa kenarsa added the question Further information is requested label Dec 23, 2021
@printmanpro
Copy link
Author

I am using a Raspberry Pi 4
As mentioned at the beginning have tried with this code in python3

import pvporcupine
access_key = "my access key"
handle = pvporcupine.create(access_key=access_key, keywords=['picovoice'])

Or if I try a demo "copied from github"
code -- porcupine_demo_mic --access_key my_access_key --keywords picovoice -- end code

So are you saying that I do not need an access key?

@kenarsa
Copy link
Member

kenarsa commented Dec 24, 2021

You do need an AccessKey. You need to create one on Picovoice Console and use it when running the engine. I just updated pvporcupinedemo to 2.0.4 to give more detailed error messages. If you upgrade and send me the exception again I can potentially help more.

@printmanpro
Copy link
Author

Hi.. and thanks for trying to help me through this problem. I installed pvporcupinedemo 2.04 and the problem seems to have disappeared.
Thanks for your help

@kenarsa kenarsa closed this as completed Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants