Giter Club home page Giter Club logo

Comments (14)

antor44 avatar antor44 commented on August 13, 2024

Hi, I don't have a macOS, but I'm using a virtualized macOS Big Sur for Intel processors. I believe this might be a font issue. Have you given this a try?

...
Create a file named ".Xresources" in your user's home directory (/Users/[user]). Inside the file, you can define specific settings to customize the appearance of the transcription text. For example:

.xtermbackground: black
.xterm
foreground: yellow
.xtermfont: 10x20
.xterm
vt100geometry: 80x10
.xterm
saveLines: 10000
.xterm*locale: true

In this example, the settings modify the background color to black, the foreground color to yellow, the font size to 10x20, the terminal's geometry to 80x10, and the number of lines to save to 10,000. After saving these changes in the ".Xresources" file, you need to relaunch XQuartz for the new settings to take effect. Once you launch an xterm terminal, you will see the desired customization of the transcription text.

The final option '.xterm*locale: true' will enable the same language settings in xterm as those in your macOS's default terminal. Although you may need to make changes and/or install additional components to display characters in other languages.
...

When I use my macOS default setup and add that file to xterm, it shows two warnings, but it still works fine for my language, which is Spanish.

By the way, make sure to check if the bash script "livestream_video.sh" has executable permission for the user before doing anything.

from livestream_video.

qqap avatar qqap commented on August 13, 2024

Hmm, I tried setting the .Xresources file as mentioned & livestream_video.sh has executable permission but still not working :(

My computer's default language is set to English.

from livestream_video.

antor44 avatar antor44 commented on August 13, 2024

I was able to reproduce the error by changing the executable permission of "livestream_video.sh". Can you confirm this? Also, could you let me know how you installed the script: did you directly download it, download the compressed file from the repository or release section, or use a git command? Maybe "livestream_video.sh" isn't in the same directory as playlist4whisper.py.

from livestream_video.

qqap avatar qqap commented on August 13, 2024

Ah, I should probably try the release. I'm currently running mainline using git clone.

Currently the permissions are
-rwxr-xr-x 1 username staff 61559 May 7 12:15 livestream_video.sh

I don't remember what the permissions were before, but after doing chmod +x livestream_video.sh it behaves the same for me.

from livestream_video.

qqap avatar qqap commented on August 13, 2024
Screenshot 2024-05-07 at 4 29 58 PM

Running it from the same directory.

from livestream_video.

qqap avatar qqap commented on August 13, 2024

and I just tried the v. 2.50 release as well by downloading the zip.

The permissions were -rwxr-xr-x@ 1 username staff 61559 May 4 02:38 livestream_video.sh by default.

However still the xterm window isn't launching.

from livestream_video.

antor44 avatar antor44 commented on August 13, 2024

It looks like whisper-cpp isn't installed. You can try installing it using the following Windows instructions:

From your base user directory where you want to store the subdirectory containing all the files, download the source code for whisper-cpp:

git clone https://github.com/ggerganov/whisper.cpp.git

Change the default directory to the whisper-cpp directory:

cd whisper.cpp

Compile whisper-cpp for CPU mode:

make

Download some models:

make tiny.en
make base.en
make base

To download playlist4whisper and livestream_video.sh, you can use the following command:

git clone https://github.com/antor44/livestream_video.git

Stay where you executed the command, move all to whisper.cpp directory:

mv livestream_video/* ~/whisper.cpp

playlist4whisper.py, livestream_video.sh, and the default playlist_xxx.m3u files must be located in the same directory as whisper-cpp and it executable main, the directory whisper.cpp

This is for CPU mode, which may be enough. However, ARM computers can improve performance with an accelerated version of whisper-cpp. If you want to install this, check out the instructions on the whisper-cpp GitHub repository.

from livestream_video.

antor44 avatar antor44 commented on August 13, 2024

Sorry, this command only works if you execute the above instructions from your user base directory (/Users/[user]): mv livestream_video/* ~/whisper.cpp

By the way, I don't know what is 'main ?1', is it a compressed directory or any other macOS thing?

from livestream_video.

qqap avatar qqap commented on August 13, 2024

I actually have whisper-cpp installed and it's a PATH variable, I installed it via brew and have been using it well for some time with Metal backend. I've used it with https://github.com/GhostNaN/whisper-subs for a while now.

from livestream_video.

qqap avatar qqap commented on August 13, 2024

Ah main ?1 is just the main branch with 1 extra file (which is the model I loaded for whisper-cpp)

from livestream_video.

antor44 avatar antor44 commented on August 13, 2024

I didn't realize that whisper-cpp was in the repositories. The bash script calls the 'main' executable of whisper-cpp in the current directory. To do this, you need to install whisper-cpp as per the instructions above. If, for some reason, you only want to use the installed whisper-cpp, acording to brew page the main executable is changed: "bin.install "main" => "whisper-cpp", you can try editing the "livestream_video.sh" script and replacing all occurrences of "./main" (there are 10) with "whisper-cpp", keep all the other strings and maintain the same spacing. I'll update a new version with the two options. Could you confirm this? It seems like whisper-cpp isn't the accelerated version for ARM's Mac, which is a big improvement. With the accelerated version, you could install larger models, but then the accelerated models are different. For example, to generate a base.en model, use:

./models/generate-coreml-model.sh base.en

from livestream_video.

qqap avatar qqap commented on August 13, 2024

Oh, I see. Let me try this and get back to you.

from livestream_video.

antor44 avatar antor44 commented on August 13, 2024

Two more notes: If you keep using the whisper-cpp installed by brew, you'll not be able to install models from the Python window, only using terminal commands.

Or if you install the accelerated version, the first run on a device might be slow because the ANE service needs to compile the Core ML model to a device-specific format. However, subsequent runs will be faster, although a user commented that there are no improvements with the M1 chip, at least with an old version of whisper-cpp.

from livestream_video.

antor44 avatar antor44 commented on August 13, 2024

I've just uploaded a new version that supports additional executables.

Regarding your xterm error, it might be due to the "/opt/X11/bin" directory not being the first entry in your $PATH variable. You could try the following commands:

rm /usr/local/bin/xterm
ln -s /opt/X11/bin/xterm /usr/local/bin/xterm

I have also tested it on macOS Ventura and found new xterm-related issues that weren't present in Big Sur. I have just uploaded another new version that might resolve all these issues.

from livestream_video.

Related Issues (3)

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.