Code Monkey home page Code Monkey logo

logseq-whisper-subtitles-server's People

Contributors

usoonees avatar yu000jp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

yu000jp kozlov-ae

logseq-whisper-subtitles-server's Issues

The system cannot find the file specified

Awesome concept. Really excited about it.

Installation of the server went without an issue.

Running python services.py results in The system cannot find the file specified error as discussed in the previous issue. I checked the whole thread to find out how the issue was resolved but failed to find a definitive answer. that's why opening new issue.

(logseq-transcription) C:\Users\Hp Pavilion\Documents\MERNStack\third-party-repos\logseq-whisper-subtitles-server\logseq_whisper_subtitles_server>python services.py
Loading base whisper model...
Loading base whisper model done.
=== English audio test
Using model:  base
Transcribing Chinese simplified audio ...
C:\Users\Hp Pavilion\.conda\envs\logseq-transcription\Lib\site-packages\whisper\transcribe.py:114: UserWarning: FP16 is not supported on CPU; using FP32 instead
  warnings.warn("FP16 is not supported on CPU; using FP32 instead")
Traceback (most recent call last):
  File "C:\Users\Hp Pavilion\Documents\MERNStack\third-party-repos\logseq-whisper-subtitles-server\logseq_whisper_subtitles_server\services.py", line 147, in <module>
    res_en = transcribe_audio("audio_english.mp3")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hp Pavilion\Documents\MERNStack\third-party-repos\logseq-whisper-subtitles-server\logseq_whisper_subtitles_server\services.py", line 84, in transcribe_audio
    transcribe = model.transcribe(audio=audio_path, verbose=True, initial_prompt="对于普通话句子,以中文简体输出")  # 避免繁体输出
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hp Pavilion\.conda\envs\logseq-transcription\Lib\site-packages\whisper\transcribe.py", line 121, in transcribe
    mel = log_mel_spectrogram(audio, padding=N_SAMPLES)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hp Pavilion\.conda\envs\logseq-transcription\Lib\site-packages\whisper\audio.py", line 140, in log_mel_spectrogram
    audio = load_audio(audio)
            ^^^^^^^^^^^^^^^^^
  File "C:\Users\Hp Pavilion\.conda\envs\logseq-transcription\Lib\site-packages\whisper\audio.py", line 59, in load_audio
    out = run(cmd, capture_output=True, check=True).stdout
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hp Pavilion\.conda\envs\logseq-transcription\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hp Pavilion\.conda\envs\logseq-transcription\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\Hp Pavilion\.conda\envs\logseq-transcription\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

UnicodeEncodeError: 'charmap' codec can't encode character '\u4fdd' in position 26: character maps to <undefined>

I attempted to transcribe a Russian-language video that is over 40 minutes long.
I had one warning before:
C:\Python311\Lib\site-packages\whisper\transcribe.py:126: UserWarning: FP16 is not supported on CPU; using FP32 instead
warnings.warn("FP16 is not supported on CPU; using FP32 instead")

Upon completion of the process, I received the following server error:
Traceback (most recent call last):
File "MyPath\logseq-whisper-subtitles-server\logseq_whisper_subtitles_server\app.py", line 74, in transcribe
"segments": transcribe_audio(audio_path, min_length, model_size, zh_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "MyPath\logseq-whisper-subtitles-server\logseq_whisper_subtitles_server\services.py", line 86, in transcribe_audio
transcribe = model.transcribe(audio=audio_path, verbose=True, initial_prompt="\u5bf9\u4e8e\u666e\u901a\u8bdd\u53e5\u5b50\uff0c\u4ee5\u4e2d\u6587\u7b80\u4f53\u8f93\u51fa") # \u907f\u514d\u7e41\u4f53\u8f93\u51fa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\whisper\transcribe.py", line 466, in transcribe
print(make_safe(line))
File "C:\Python311\Lib\encodings\cp1251.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u4fdd' in position 26: character maps to
127.0.0.1 - - [01/Mar/2024 13:10:34] "POST /transcribe HTTP/1.1" 200 -

Unable to create file locally from YouTube

First, thank you for providing such a great plugin. I try and do not know how to use. It looks like the file isn't downloading.

What I did; Run from the menu of the block with "{{youtube URL}}".
Error message:

logseq-whisper-subtitle-server error: [Errno 2] No such file or directory: 
'D:\\ ------ \\logseq-whisper-subtitles-server\\logseq_whisper_subtitles_server\\.\\youtube/youtube_audio_6968954bf60841b48f987933359b93d3.mp3'

My guess is, the server is running. But the file was not found in the directory.

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.