Giter Site home page Giter Site logo

diane's People

Contributors

mickekring avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

diane's Issues

Cannot stop the recording

Hi Micke

I seem not to be able to stop the recording after I started it. These are the steps on the way:

  1. I get a warning when executing main.py:

uwestephan@Uwes-MacBook-Air Diane-main2 % python3 main.py
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)

  1. When I ignore the warning an start a recording by pressing the red button the following happens in the Terminal window:

_--- --- ---

Recording...
Converting to mp3
Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/init.py", line 1948, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/customtkinter/windows/widgets/ctk_button.py", line 553, in _clicked
self._command()
File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 253, in
command=lambda: record(self, icon_rec, icon_stop_rec), text="Spela in")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 108, in record
convert_to_mp3(filename, mp3_filename)
File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 55, in convert_to_mp3
audio.export(output_file, format="mp3")
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydub/audio_segment.py", line 963, in export
p = subprocess.Popen(conversion_command, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1901, in execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

  1. When I now press the red "Stoppa inspelningen" button, nothing happens. I have to kill it manually.

Anny ideas what might have happened?

Best regards Uwe

Empty recording?

Hi Micke

When I stop the recording in "Diane" the app seems to store an empty audio-file in the audio folder. Whisper can then not transcribe anything an ChatGPT wonders what it should summarize.

I'm a little new to python on the MacOS. Is that anything that you have experienced when coding? Or is it a setting on my side?

Thank you in advance!
Best regards
Uwe

InvalidRequestError due to exceeding the model's maximum context length

When using OpenAI's GPT-3.5-turbo model, you may encounter an InvalidRequestError due to exceeding the model's maximum context length. The error message will indicate that your input message has resulted in more tokens than the model can handle. The program might need to adress this issue in order to get a proper response.

To resolve this issue, the user or program needs to reduce the number of tokens in a particular input. There may be several ways to do this:

  • Divide input text into several parts: Trim the text in the messages to create several parts with a reasonable token size.

  • Limit the input data and stop the recording and create several recordings that propagate reasonable lenghts of transcription.

  • Token counting utility: Use OpenAI's tiktoken Python library to count tokens in a text string without making an API call. This might manage mana input size.

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.