porcupine icon indicating copy to clipboard operation
porcupine copied to clipboard

Porcupine Activation Error

Open ee21m578 opened this issue 2 years ago • 3 comments

When running the create command for porcupine, I get the below error: porcupine = pvporcupine.create(access_key='u.....................=',keywords=['picovoice', 'bumblebee'])

Traceback (most recent call last): File "<pyshell#2>", line 1, in porcupine = pvporcupine.create(access_key='u/4o2Ud+ngjjSJKVNKx/8RgK4J+hoRrtm+y1mC3xjyglMjpE8PligA==',keywords=['picovoice', 'bumblebee']) File "C:\Users\akelkart\AppData\Local\Programs\Python\Python38\lib\site-packages\pvporcupine_init_.py", line 77, in create return Porcupine( File "C:\Users\akelkart\AppData\Local\Programs\Python\Python38\lib\site-packages\pvporcupine\porcupine.py", line 158, in init raise self._PICOVOICE_STATUS_TO_EXCEPTIONstatus pvporcupine.porcupine.PorcupineActivationError Capture

ee21m578 avatar Sep 27 '22 05:09 ee21m578

Can you also provide the version of pvporcupine installed on your computer?

mrrostam avatar Sep 27 '22 13:09 mrrostam

pvporcupine in ......\site-packages (2.1.4)

ee21m578 avatar Sep 27 '22 17:09 ee21m578

I cannot reproduce it on my side. Can you confirm that you have access to the internet and there is no firewall blocking it?

mrrostam avatar Sep 28 '22 20:09 mrrostam

closing due to inactivity. re-open if needed

mrrostam avatar Sep 30 '22 17:09 mrrostam

Yes, I have internet connectivity. Have checked all possible solutions, but did not work

ee21m578 avatar Oct 01 '22 03:10 ee21m578

Please re-open the issue. The timezone difference causes a delay of few hours

ee21m578 avatar Oct 01 '22 03:10 ee21m578

The issue is with pvcobra as well. There might be something I am missing image

ee21m578 avatar Oct 01 '22 03:10 ee21m578

1- Are you sure you are inputting your AccessKey correctly? Make sure what is between "" is 100% correct. 2- Can you try your code on some other computer? 3- Can you try one of the official demos for porcupine or cobra and see what you get from them? 4- Please provide detailed information about your machine (OS build etc). 5- Please provide detailed information about your network settings. e.g. firewall settings etc.

kenarsa avatar Oct 02 '22 15:10 kenarsa

1- Are you sure you are inputting your AccessKey correctly? Make sure what is between "" is 100% correct. ==> Yes 2- Can you try your code on some other computer? ==> Not working 3- Can you try one of the official demos for porcupine or cobra and see what you get from them? ==> The demos are not working. Maybe I am inputting in a wrong way 4- Please provide detailed information about your machine (OS build etc). ==> OS Name Microsoft Windows 10 Enterprise Version 10.0.19042 Build 19042 5- Please provide detailed information about your network settings. e.g. firewall settings etc. ==> Firewall would be ON always since I am using my company's laptop

ee21m578 avatar Oct 03 '22 05:10 ee21m578

let me try on my personal machine once. All devices I have tried are either office machines or connected to office network.

ee21m578 avatar Oct 03 '22 05:10 ee21m578

It is working on a personal machine. But, again unable to

keyword_path = ['E:/New_Folder/PYAUDIO/xyz.ppn'] porcupine = pvporcupine.create(access_key=access_key, keyword_paths=keyword_path)

File "E:\BLASTOISE\PYAUDIO\trails_raspberry.py", line 14, in porcupine = pvporcupine.create(access_key=access_key, keyword_paths=keyword_path) File "C:\Users\akell\AppData\Local\Programs\Python\Python310\lib\site-packages\pvporcupine_init.py", line 77, in create return Porcupine( File "C:\Users\akell\AppData\Local\Programs\Python\Python310\lib\site-packages\pvporcupine\porcupine.py", line 158, in init raise self.PICOVOICE_STATUS_TO_EXCEPTIONstatus pvporcupine.porcupine.PorcupineInvalidArgumentError

==> The same worked on colab

Screenshot (1)

ee21m578 avatar Oct 03 '22 11:10 ee21m578

progress ... your work computer firewall or something in your network is causing the issue regarding activation.

the invalid argument is about something in your input arguments is incorrect. I can't tell you what it is cause I don't know what you have on your computer.

kenarsa avatar Oct 03 '22 13:10 kenarsa

Yes. it is an issue with firewall regarding activation. But even after following the porcupine documentation as is, I get the 'invalid argument error'.

I can't tell you what it is cause I don't know what you have on your computer. ==> Sure. I understand. Let me know if any further info is needed to understand this. All the commands I used are posted above. Or at least the ones in bold correct?

Updating paths and commands in above comment

ee21m578 avatar Oct 04 '22 05:10 ee21m578

The screenshot shows that you are using a keyword (.ppn) generated for Raspberry-pi on a Windows machine. Can you fix this and try again?

mrrostam avatar Oct 04 '22 16:10 mrrostam

Yes. It indeed works with windows version. Guess, the problem is with my simulation of raspberry pi on windows. Thanks a lot for the support.

ee21m578 avatar Oct 04 '22 16:10 ee21m578