Code Monkey home page Code Monkey logo

java-vosk-livesubtitle's Introduction

java-vosk-livesubtitle

This is a java based desktop application that can RECOGNIZE any live streaming in 21 languages that supported by VOSK then TRANSLATE and display it as LIVE SUBTITLES

java-vosk-livesubtitle.480p.mp4

This app was develepoed with Apache Netbeans IDE 15 https://netbeans.apache.org/download/index.html which using Oracle JRE v1.8.0_351 and SWING as its GUI framework.

The speech recognition part is using java vosk api https://github.com/alphacep/vosk-api/tree/master/java/lib/src/main/java/org/vosk

The translation part is using self made GoogleTranslator class

If you want to build this source to an exe file, you will need jar2exe https://www.jar2exe.com/

That build.gradle file must contain these lines beside other standard tags :

jar {
    manifest {
        attributes(
                'Main-Class': 'org.vosk.LiveSubtitle'
        )
    }

 duplicatesStrategy = DuplicatesStrategy.INCLUDE
 from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }

}

After Clean And Build with Netbeans, goto that build\distribution folder and extract that zip file.

Then open jar2exe, browse to distributions\java-vosk-livesubtitle\lib folder, select java-vosk-livesubtitle.jar as source that you want to convert to exe jar2exe-browse

Set JDK version to 1.8. jar2exe-set-jdk

Choose Windows GUI Application if you don't want to see any log exception in DOS interface. image

Add all other jar files in that lib folder except that java-vosk-livesubtitle.jar that you already set as main source. jar2exe-add-jar jar2exe-add-jar2

Don't forget to check Create 64bits executivce to avoid libvosk dll errors image

Then click Config Internal to set additional compile parameter UTF-8 enconding so you can see and translate Chinese and Japanese characters correctly. image

Select Custom tab and paste this code :

option -Dfile.encoding=UTF-8

jar2exe-set-utf-8

click Apply and OK, then Next to start compile.

The file java-vosk-livesubtitle.exe will be created on same folder of those jar filers (lib folder)

Now you can run this app in one single click.

Don't forget to put that models folder into same folder with java-vosk-livesubtitle.exe and also don't forget to extract those fonts I've included in compressed zip release file into C:\Windows\Fonts\ folder!

As usual for best recognizing quality, on windows you will need STEREO MIX or VIRTUAL AUDIO CABLE as RECORDING/INPUT DEVICE image image image

and on linux you willl need PAVUCONTROL (by choosing MONITOR of your audio device as INPUT DEVICE) image

License

MIT

Check my other SPEECH RECOGNITIION + TRANSLATE PROJECTS https://github.com/botbahlul?tab=repositories

Buy me coffee : https://sociabuzz.com/botbahlul/tribe

java-vosk-livesubtitle's People

Contributors

botbahlul avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gschafra

java-vosk-livesubtitle's Issues

Trying English to Indonesian doesn't seem to work

I have tried it out in Japanese to Indonesian and it have worked fine, but when trying out English to Indonesian no text seem to get taken at all.

My Folder Structure for the Exe
C:\Folder\Class\IIP\pap2ref\Subtitle\java-vosk-livesubtitle-main\build\distributions\java-vosk-livesubtitle-main\lib\models
image

Image of Japanese to Indonesian Working for Me
image

Image of English to Indonesian not working at all
image

Can it be said it's because of English Language does not have a model?

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.