Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/botbahlul/java-vosk-livesubtitle
JAVA based DESKTOP APP that can RECOGNIZE any live streaming in 21 languages that supported by VOSK then TRANSLATE (using unofficial online Google Translate API) and display it as LIVE CAPTION / LIVE SUBTITLE
https://github.com/botbahlul/java-vosk-livesubtitle
auto-caption auto-subtitle google-translate-api java live-caption live-subtitle speech-recognition voice-recognition vosk
Last synced: about 8 hours ago
JSON representation
JAVA based DESKTOP APP that can RECOGNIZE any live streaming in 21 languages that supported by VOSK then TRANSLATE (using unofficial online Google Translate API) and display it as LIVE CAPTION / LIVE SUBTITLE
- Host: GitHub
- URL: https://github.com/botbahlul/java-vosk-livesubtitle
- Owner: botbahlul
- Created: 2022-11-05T19:57:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-05T16:57:10.000Z (6 months ago)
- Last Synced: 2024-05-05T17:54:32.955Z (6 months ago)
- Topics: auto-caption, auto-subtitle, google-translate-api, java, live-caption, live-subtitle, speech-recognition, voice-recognition, vosk
- Language: Java
- Homepage:
- Size: 40.5 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
https://user-images.githubusercontent.com/88623122/200159557-23b7789d-4788-445a-8f5f-93be889a2e14.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
Set JDK version to 1.8.
Choose Windows GUI Application if you don't want to see any log exception in DOS interface.
![image](https://user-images.githubusercontent.com/88623122/200141364-a8410c16-305f-40ae-9099-1458f987fba4.png)Add all other jar files in that lib folder except that java-vosk-livesubtitle.jar that you already set as main source.
Don't forget to check Create 64bits executivce to avoid libvosk dll errors
![image](https://user-images.githubusercontent.com/88623122/200141628-c37bde19-573f-47d2-876e-b8d7e446a330.png)Then click Config Internal to set additional compile parameter UTF-8 enconding so you can see and translate Chinese and Japanese characters correctly.
![image](https://user-images.githubusercontent.com/88623122/200141910-90e65f0b-b20e-4382-acc2-810caf823e1c.png)Select Custom tab and paste this code :
```
option -Dfile.encoding=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](https://user-images.githubusercontent.com/88623122/199527559-e2609d8c-3479-420d-8c52-806fa56a21f4.png)
![image](https://user-images.githubusercontent.com/88623122/199528286-1ab77dc4-38a9-41f2-9b92-25db352a1ed2.png)
![image](https://user-images.githubusercontent.com/88623122/199528861-22541706-3bdf-427c-8c2f-44174b114e34.png)and on linux you willl need PAVUCONTROL (by choosing MONITOR of your audio device as INPUT DEVICE)
![image](https://user-images.githubusercontent.com/88623122/199517907-76d61acb-3f07-49b6-8f2f-4b6a2b787eff.png)### License
MITCheck my other SPEECH RECOGNITIION + TRANSLATE PROJECTS https://github.com/botbahlul?tab=repositories
Buy me coffee : https://sociabuzz.com/botbahlul/tribe