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

Numpy np.int depreciated #1

Open
etienno83 opened this issue Jul 4, 2023 · 0 comments
Open

Numpy np.int depreciated #1

etienno83 opened this issue Jul 4, 2023 · 0 comments

Comments

@etienno83
Copy link

Hello,

First, I would like to thank you for this code. It will help me grately in my quest to create an assistant for my blind grandma.

Nonetheless, I have an issue while running your script. My mic is correctly connected and my speakers too. I have the "listenning..." printed, I talk in my mic but then I have this issue :

Traceback (most recent call last):
  File "c:\Users\etien\workflow\jarvis\jarvis.py", line 86, in <module>
    text = assistant.listen()
           ^^^^^^^^^^^^^^^^^^
  File "c:\Users\etien\workflow\jarvis\jarvis.py", line 42, in listen
    wavfile.write(temp_wav_file.name, fs, audio)
  File "C:\Users\etien\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\wavfile\__init__.py", line 106, in write
    with open(path, 'w', sample_rate=sample_rate, bits_per_sample=bits_per_sample, fmt=fmt) as wf:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\etien\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\wavfile\__init__.py", line 53, in open
    return wavwrite.WavWrite(f, sample_rate=sample_rate, num_channels=num_channels,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\etien\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\wavfile\wavwrite.py", line 53, in __init__
    self._data_chunk.fmt_chunk.sample_rate = int(sample_rate)
                                             ^^^^^^^^^^^^^^^^
TypeError: only length-1 arrays can be converted to Python scalars

I looked it up, it seems that numpy has depreciated the .int.

Any chance you could help me with that?

Thanks again

Etienne from France

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

1 participant