Git Product home page Git Product logo

sevask / ecoute Goto Github PK

View Code? Open in Web Editor NEW
5.6K 5.6K 773.0 131.17 MB

Ecoute is a live transcription tool that provides real-time transcripts for both the user's microphone input (You) and the user's speakers output (Speaker) in a textbox. It also generates a suggested response using OpenAI's GPT-3.5 for the user to say based on the live transcription of the conversation.

Home Page: https://github.com/SevaSk/ecoute

License: MIT License

Python 100.00%
gpt-35-turbo whisper-ai windows

ecoute's People

Contributors

sevask avatar zarifpour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecoute's Issues

Feature request: keyword/phrase detection for common rebuttals

I work in sales, and we have a document of common objections and rebuttals. However, it is very hard to navigate them on the fly without huge pauses and searching.

It would be fantastic if you could incorporate a workflow useful for a sales experience.

You exceeded your current quota, please check your plan and billing details.

I had this error at the beginning when I was a Free Tier User.
I upgraded my plan into ChatGPT Plus, created a new API KEY and changed it in keys.py but I still get this error directly after Escoute interface pops out:
[INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic...
[INFO] Completed ambient noise adjustment for Default Mic.
[INFO] Adjusting for ambient noise from Default Speaker. Please make or play some noise from the Default Speaker...
[INFO] Completed ambient noise adjustment for Default Speaker.
READY
You exceeded your current quota, please check your plan and billing details.
You exceeded your current quota, please check your plan and billing details.
You exceeded your current quota, please check your plan and billing details.

Requirement already satisfied: whisper BUT Can't open main.py

When i run "python main.py --api" I have this error.

Traceback (most recent call last):
File "main.py", line 2, in
from AudioTranscriber import AudioTranscriber
File "C:\Users\Technomix\Desktop\interview\ecoute\AudioTranscriber.py", line 1, in
import whisper
File "C:\Users\Technomix\AppData\Local\Programs\Python\Python38-32\lib\site-packages\whisper.py", line 69, in
libc = ctypes.CDLL(libc_name)
File "C:\Users\Technomix\AppData\Local\Programs\Python\Python38-32\lib\ctypes_init_.py", line 363, in init
if '/' in name or '\' in name:
TypeError: argument of type 'NoneType' is not iterable
PS C:\Users\Technomix\Desktop\interview\ecoute> pip install --upgrade whisper
Requirement already satisfied: whisper in c:\users\technomix\appdata\local\programs\python\python38-32\lib\site-packages (1.1.10)
Requirement already satisfied: six in c:\users\technomix\appdata\local\programs\python\python38-32\lib\site-packages (from whisper) (1.16.0)
PS C:\Users\Technomix\Desktop\interview\ecoute> python -version
C:\Users\Technomix\AppData\Local\Programs\Python\Python38-32\python.exe: can't open file 'ΓÇôversion': [Errno 2] No such file or directory

how to deal with it

PS C:\WINDOWS\system32\ecoute> python main.py
C:\Users\Lorve\AppData\Local\Programs\Python\Python311\Lib\site-packages\whisper\timing.py:57: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
@numba.jit
Traceback (most recent call last):
File "C:\WINDOWS\system32\ecoute\main.py", line 3, in
from GPTResponder import GPTResponder
File "C:\WINDOWS\system32\ecoute\GPTResponder.py", line 2, in
from keys import OPENAI_API_KEY
File "C:\WINDOWS\system32\ecoute\keys.py", line 1, in
OPENAI_API_KEY=*****************************************
^^
NameError: name 'sk' is not defined

The last step shows the problem ValueError: source code string cannot contain null bytes

Hi there,
When I reach the last step, it shows the following message, I check the key.py file,no null bytes
Could you please help me to solve this step?Thank you
PS C:\Windows\system32\Ecoute> python main.py
Traceback (most recent call last):
File "C:\Windows\system32\Ecoute\main.py", line 3, in
from GPTResponder import GPTResponder
File "C:\Windows\system32\Ecoute\GPTResponder.py", line 2, in
from keys import OPENAI_API_KEY
ValueError: source code string cannot contain null bytes
PS C:\Windows\system32\Ecoute> python main.py --api
Traceback (most recent call last):
File "C:\Windows\system32\Ecoute\main.py", line 3, in
from GPTResponder import GPTResponder
File "C:\Windows\system32\Ecoute\GPTResponder.py", line 2, in
from keys import OPENAI_API_KEY
ValueError: source code string cannot contain null bytes

Use a different function for the response suggestions?

Would it be possible to use a different API or function for the response suggestions? In my experience, I have not not been able to use that functionality due to always exceeding my quota. Are there any other free or opensource models that can be used in place of OpenAI gpt-3.5-turbo-0301 ?

image

Requirements.txt error

I'm getting the same error without/with using venv:

Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117
Collecting numpy==1.24.3 (from -r requirements.txt (line 1))
  Using cached numpy-1.24.3-cp311-cp311-macosx_11_0_arm64.whl (13.8 MB)
Collecting openai-whisper==20230314 (from -r requirements.txt (line 2))
  Using cached openai-whisper-20230314.tar.gz (792 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Wave==0.0.2 (from -r requirements.txt (line 3))
  Using cached Wave-0.0.2.zip (38 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting openai==0.27.6 (from -r requirements.txt (line 4))
  Using cached openai-0.27.6-py3-none-any.whl (71 kB)
Collecting customtkinter==5.1.3 (from -r requirements.txt (line 5))
  Using cached customtkinter-5.1.3-py3-none-any.whl (295 kB)

ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement PyAudioWPatch==0.2.12.5 (from versions: none)
ERROR: No matching distribution found for PyAudioWPatch==0.2.12.5

No Response From GPT

Description:
After I ran python main.py, everything else works fine, but I can not get the response from GPT.
Anyone can help?

issue issue2

Can't install requirements

  1. fresh clone of repo (on mac)
  2. pip3 install -r requirements.txt
➜  git cd ecoute 
➜  ecoute git:(main) pip3 install -r requirements.txt 
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117
Requirement already satisfied: numpy==1.24.3 in /usr/local/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (1.24.3)
Collecting openai-whisper==20230314 (from -r requirements.txt (line 2))
  Downloading openai-whisper-20230314.tar.gz (792 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 792.9/792.9 kB 6.1 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Wave==0.0.2 (from -r requirements.txt (line 3))
  Downloading Wave-0.0.2.zip (38 kB)
  Preparing metadata (setup.py) ... done
Collecting openai==0.27.6 (from -r requirements.txt (line 4))
  Downloading openai-0.27.6-py3-none-any.whl (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.9/71.9 kB 2.2 MB/s eta 0:00:00
Collecting customtkinter==5.1.3 (from -r requirements.txt (line 5))
  Downloading customtkinter-5.1.3-py3-none-any.whl (295 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 295.2/295.2 kB 3.2 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement PyAudioWPatch==0.2.12.5 (from versions: none)
ERROR: No matching distribution found for PyAudioWPatch==0.2.12.5
➜  ecoute git:(main) 
Screenshot 2023-05-30 at 16 23 53

error when running main.py file

So I followed instructions and installed ecoute.
But when I run this command:

python main.py

I get this error:

C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\whisper\timing.py:58: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def backtrace(trace: np.ndarray):
Traceback (most recent call last):
File "C:\ecoute\main.py", line 3, in
from GPTResponder import GPTResponder
File "C:\ecoute\GPTResponder.py", line 2, in
from keys import OPENAI_API_KEY
ValueError: source code string cannot contain null bytes

Any idea on how to fix this?

Very Slow Load times, unlike the Demo Video

Hi,
While using the app the input and output loads very slow.
its nothing like the demo video.

I have tried reducing the update time to 1 second still its not even close to being as fast the demo video.

Note - I am on free trial credits of the OpenAI API.

Am I missing something?

Nothing is being generated

Hello I am running in pycharm and the gui pops up but I dont see any text transcription and I get the error:

"You exceeded your current quota, please check your plan and billing details."

but I have the premium account, is this defaulting to GPT-4 or something? I dont see any text populating and checking the settings on the openai site to see my usage nothing is coming up... Do I need to upgrade to 120$/mo plan to use this?
image

Any help is appreciated thanks

The system cannot find the file specified

Hi
When I ran the code I got " [WinError 2] The system cannot find the file specified". I downloaded and used files on 5/31/2023; therefore; my main file is new.

E:\test\ecoute>python main.py
C:\Users\KPP\AppData\Local\Programs\Python\Python39\lib\site-packages\whisper\timing.py:58: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def backtrace(trace: np.ndarray):
[INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic...
[INFO] Completed ambient noise adjustment for Default Mic.
[INFO] Adjusting for ambient noise from Default Speaker. Please make or play some noise from the Default Speaker...
[INFO] Completed ambient noise adjustment for Default Speaker.
[INFO] Whisper using GPU: True
READY
[WinError 2] The system cannot find the file specified
[WinError 2] The system cannot find the file specified
[WinError 2] The system cannot find the file specified
[WinError 2] The system cannot find the file specified
[WinError 2] The system cannot find the file specified

Add multilingual interviews and responses in another language

Hello, it will be possible that soon we will have the option of doing interviews in another language.

My first language is Spanish but I want to access the American market and I just need you to transcribe and give me answers in both English and Spanish

ValueError

[Running] python -u "d:\ecoute\main.py"
C:\Users\dav1d\AppData\Local\Programs\Python\Python310\lib\site-packages\whisper\timing.py:58: NumbaDeprecationWarning: �[1mThe 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.�[0m
def backtrace(trace: np.ndarray):
Traceback (most recent call last):
File "d:\ecoute\main.py", line 3, in
from GPTResponder import GPTResponder
File "d:\ecoute\GPTResponder.py", line 2, in
from keys import OPENAI_API_KEY
ValueError: source code string cannot contain null bytes

[Done] exited with code=1 in 2.24 seconds

Option to include prompts/documentation

Hi,

First of all thank you for sharing this very interesting project.

I was wondering if it would be possible to add a prompt feature in order to guide chatgpt answering in a specific tone or with specific information etc. It would be also very interesting to include files upload too (pdf, csv) in order to give it some data and base the answers upon those files.

What do you think about that?

Feature Request: Contextual Information

First off, props to you for building this killer live transcription tool. I see this saving my ass on the daily. Damn, that's some next-level stuff.
I've got a feature request that could crank this thing up to 11. The suggested responses are cool, but they're missing a bit of that personal touch. They need a bit more...context, you know? Here's the pitch: Let users feed the beast some intel about themselves before a meeting. Role, experience, meeting context, favorite programming language, whatever. Like, if I'm a seasoned dev with a decade of experience in the trenches, about to dive into a code review, the tool could use that info to spit out responses that are more my style.
You could make this happen with a quick form before a meeting, or even better maybe a profile that users can tweak whenever they want. Then, the tool uses this info to adjust the vibe, the lingo, the whole damn conversation. This isn't just about making the tool more useful, it's about making it more badass. It's about giving it that personal edge that makes it feel like it's really got your back, especially in those high-stakes professional convos where context is king.

Can't wait to see where you take Ecoute next.

Translate or Transcribe?

class APIWhisperTranscriber:
def get_transcription(self, wav_file_path):
try:
with open(wav_file_path, "rb") as audio_file:
result = openai.Audio.translate("whisper-1", audio_file)
except Exception as e:
print(e)
return ''
return result['text'].strip()

result = openai.Audio.translate("whisper-1", audio_file) # here should be openai.Audio.transcribe ?

Rewrite in Other Languages to Support More OSs

Is anyone here interested in rewriting it in Go or Rust to also support Mac and Linux? Because as I see PyAudioWPatch is just for Windows. Also could be an idea to see if the implementation in Go or Rust is faster or not!

"I successfully ran the application following the documentation."

"I successfully ran the application following the documentation, and the following message was prompted."
C:\Users\86136\AppData\Local\Programs\Python\Python311\Lib\site-packages\whisper\timing.py:57: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details. @numba.jit [INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic... [INFO] Completed ambient noise adjustment for Default Mic. [INFO] Adjusting for ambient noise from Default Speaker. Please make or play some noise from the Default Speaker...

"However, there were no further responses after that. How can I bring up the response display box to allow for real-time output?"

Adding MAC OS support

The reason this code does not run on macOS is because it relies on the PyAudioWPatch library for recording sound from speakers. This library specifically utilizes the Windows Audio Session API (WASAPI), enabling the use of output devices that support this API in loopback mode.

To make the code work on macOS, we would need a comparable feature that can record sound from speakers. The primary modifications would be required in the DefaultSpeakerRecorder class, where we currently use WASAPI to create the audio stream for recording. A potential solution could be leveraging tools like BlackHole to achieve similar functionality on macOS.

Add Multilanguage Support

Currently, we are using the English Whisper model for transcribing and we are responding in English as well. One possible improvement would be to add a dropdown menu for selecting the desired language for transcription and response generation which sets the appropriate models can be used in the code.

Returning an error while running the main.py

I have successfully installed all the libraries. Then i tried running the python main.py and python main.py -- Both are returning same error which is below

(base) PS C:\Users\nithi\Downloads\ecoute> python main.py --api
Traceback (most recent call last):
  File "C:\Users\nithi\Downloads\ecoute\main.py", line 2, in <module>
    from AudioTranscriber import AudioTranscriber
  File "C:\Users\nithi\Downloads\ecoute\AudioTranscriber.py", line 1, in <module>
    import whisper
  File "C:\Users\nithi\anaconda3\lib\site-packages\whisper\__init__.py", line 13, in <module>
    from .model import ModelDimensions, Whisper
  File "C:\Users\nithi\anaconda3\lib\site-packages\whisper\model.py", line 13, in <module>
    from .transcribe import transcribe as transcribe_function
  File "C:\Users\nithi\anaconda3\lib\site-packages\whisper\transcribe.py", line 20, in <module>
    from .timing import add_word_timestamps
  File "C:\Users\nithi\anaconda3\lib\site-packages\whisper\timing.py", line 7, in <module>
    import numba
  File "C:\Users\nithi\anaconda3\lib\site-packages\numba\__init__.py", line 42, in <module>
    from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
  File "C:\Users\nithi\anaconda3\lib\site-packages\numba\np\ufunc\__init__.py", line 3, in <module>
    from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
  File "C:\Users\nithi\anaconda3\lib\site-packages\numba\np\ufunc\decorators.py", line 3, in <module>
    from numba.np.ufunc import _internal

image

I'm not sure what's the problem is. Can anyone please look into this error?

Porting to Mac and improve performance

This is a really good project. I'm learning from it.

I just did some dirty hard-code and make it work on my Macbook Air (Intel model). It runs pretty slow.

Could you share any solution to optimize? (Yes, I"m asking Google and ChatGPT at the same time)

Thanks!

p.s. I'm trying to on an ARM Linux SBC as well, hope it works.

Whisper using GPU: False

I would like to have the option to use my GPU for whisper, thank you.

I have whisper on my PC and it uses my GPU perfectly with no issues, however now using this program its not utilising my GPU.

An error occurred while calling OpenAI ChatCompletion.

I got everything up and running but am running into this error. I've uninstalled and reinstalled openai and updated python but that didn't seem to help. I don't believe I'm rated limited because I can still use chatgpt.

Encoute running successfully, but no results. Exceeded quota ??

Hello,
I've installed encoute as referred in the documentation. Installation completed successfully. When I ran the program using the command python main.py --api it was executed smoothly. When I tried to play a couple of audio files, I can't see any results in the response section.
I've only one default system microphone and permissions are also given. What am I missing here ??

image

image

What does it mean by exceeded quota ??

image

personal comunication style

Personalize the GPT training based on the user's communication style. This enables them to communicate in their own unique manner. For instance, train the GPT model to analyze resumes prior to scheduling interviews. This training will enhance the bot's understanding of individuals and allow it to provide personalized responses to interview questions, rather than generating random answers. In Future you dont need to attend some meetings , bot with your own clone brain can attend the meetings with avatar.

File Encoding

this echo 'OPENAI_API_KEY = "API KEY"' > keys.py
encodse the keys.py in the wrong format and gives error when running.
Make sure the file is saved in utf8 before running.

Was getting this error otherwise
Traceback (most recent call last):
File "C:\Users\New User\Desktop\ecoute\main.py", line 3, in
from GPTResponder import GPTResponder
File "C:\Users\New User\Desktop\ecoute\GPTResponder.py", line 2, in
from keys import OPENAI_API_KEY
ValueError: source code string cannot contain null bytes

Potential Cost Incurred by Leaving Terminal Command Open for Extended Periods

inadvertently left the terminal command open on my PC for a continuous 6-hour duration, resulting in an approximate expenditure of $1.5 due to ongoing prompts, despite having turned off the UI tkinter. Considering the possibility of others encountering the same accidental behavior, I would like to share this issue here.

Improve the response generated

The responses produced could be improved to yield more useful information than they currently do. Some suggestions include having the system respond in bullet points or having a way to incorporate additional information about the conversion that we are providing, thereby making the generated responses more beneficial.

I will leave this issue open-ended, as there are numerous ways to implement these improvements.

i am getting an error while running main.py--api

i am very new to programming and can someone help me with this

i am getting this
PS C:\Windows\system32\ecoute> python main.py --api
C:\Users\pritamreddy9169\AppData\Local\Programs\Python\Python310\lib\site-packages\whisper\timing.py:58: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def backtrace(trace: np.ndarray):
[INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic...
Traceback (most recent call last):
File "C:\Windows\system32\ecoute\AudioRecorder.py", line 20, in adjust_for_noise
self.recorder.adjust_for_ambient_noise(self.source)
File "C:\Windows\system32\ecoute\custom_speech_recognition_init_.py", line 399, in adjust_for_ambient_noise
assert source.stream is not None, "Audio source must be entered before adjusting, see documentation for AudioSource; are you using source outside of a with statement?"
AssertionError: Audio source must be entered before adjusting, see documentation for AudioSource; are you using source outside of a with statement?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Windows\system32\ecoute\main.py", line 121, in
main()
File "C:\Windows\system32\ecoute\main.py", line 73, in main
user_audio_recorder = AudioRecorder.DefaultMicRecorder()
File "C:\Windows\system32\ecoute\AudioRecorder.py", line 33, in init
self.adjust_for_noise("Default Mic", "Please make some noise from the Default Mic...")
File "C:\Windows\system32\ecoute\AudioRecorder.py", line 19, in adjust_for_noise
with self.source:
File "C:\Windows\system32\ecoute\custom_speech_recognition_init_.py", line 205, in exit
self.stream.close()
AttributeError: 'NoneType' object has no attribute 'close'

Facing an issue while running main.py

PS C:\WINDOWS\system32\ecoute> python main.py
Traceback (most recent call last):
File "C:\WINDOWS\system32\ecoute\main.py", line 2, in
from AudioTranscriber import AudioTranscriber
File "C:\WINDOWS\system32\ecoute\AudioTranscriber.py", line 1, in
import whisper
File "C:\Users\Lazyv\AppData\Local\Programs\Python\Python311\Lib\site-packages\whisper.py", line 69, in
libc = ctypes.CDLL(libc_name)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lazyv\AppData\Local\Programs\Python\Python311\Lib\ctypes_init_.py", line 366, in init
if '/' in name or '\' in name:
^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

an error while running main.py --api

 C:\Windows\System32\ecoute> python main.py --api
C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\whisper\timing.py:58: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  def backtrace(trace: np.ndarray):
[INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic...
Traceback (most recent call last):
  File "C:\Windows\System32\ecoute\AudioRecorder.py", line 20, in adjust_for_noise
    self.recorder.adjust_for_ambient_noise(self.source)
  File "C:\Windows\System32\ecoute\custom_speech_recognition\__init__.py", line 399, in adjust_for_ambient_noise
    assert source.stream is not None, "Audio source must be entered before adjusting, see documentation for ``AudioSource``; are you using ``source`` outside of a ``with`` statement?"
AssertionError: Audio source must be entered before adjusting, see documentation for ``AudioSource``; are you using ``source`` outside of a ``with`` statement?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Windows\System32\ecoute\main.py", line 121, in <module>
    main()
  File "C:\Windows\System32\ecoute\main.py", line 73, in main
    user_audio_recorder = AudioRecorder.DefaultMicRecorder()
  File "C:\Windows\System32\ecoute\AudioRecorder.py", line 33, in __init__
    self.adjust_for_noise("Default Mic", "Please make some noise from the Default Mic...")
  File "C:\Windows\System32\ecoute\AudioRecorder.py", line 19, in adjust_for_noise
    with self.source:
  File "C:\Windows\System32\ecoute\custom_speech_recognition\__init__.py", line 205, in __exit__
    self.stream.close()
AttributeError: 'NoneType' object has no attribute 'close'``` 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.