Adds WhisperX, reworks UI (still needs some work), theoretically usable
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||
<artifactId>autosubtitle-whisper</artifactId>
|
||||
<artifactId>autosubtitle-whisperx</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.github.gtache.autosubtitle.run;
|
||||
package com.github.gtache.autosubtitle.gui.run;
|
||||
|
||||
import com.github.gtache.autosubtitle.modules.run.DaggerRunComponent;
|
||||
import com.github.gtache.autosubtitle.modules.gui.run.DaggerRunComponent;
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/**
|
||||
* Main GUI class
|
||||
*/
|
||||
public final class Main extends Application {
|
||||
|
||||
@Override
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.github.gtache.autosubtitle.modules.run;
|
||||
package com.github.gtache.autosubtitle.modules.gui.run;
|
||||
|
||||
import com.github.gtache.autosubtitle.Language;
|
||||
import com.github.gtache.autosubtitle.Translator;
|
||||
@@ -9,8 +9,6 @@ import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
/**
|
||||
* Module for missing components
|
||||
*/
|
||||
@@ -22,9 +20,8 @@ public abstract class MissingComponentsModule {
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
static Translator providesTranslator() {
|
||||
return new Translator() {
|
||||
return new Translator<>() {
|
||||
@Override
|
||||
public Language getLanguage(final String text) {
|
||||
return Language.getDefault();
|
||||
@@ -41,14 +38,13 @@ public abstract class MissingComponentsModule {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubtitleCollection translate(final SubtitleCollection collection, final Language to) {
|
||||
return collection;
|
||||
public SubtitleCollection<Subtitle> translate(final SubtitleCollection<?> collection, final Language to) {
|
||||
return (SubtitleCollection<Subtitle>) collection;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@TranslatorSetup
|
||||
static SetupManager providesTranslatorSetupManager() {
|
||||
return new NoOpSetupManager();
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.github.gtache.autosubtitle.modules.run;
|
||||
package com.github.gtache.autosubtitle.modules.gui.run;
|
||||
|
||||
import com.github.gtache.autosubtitle.setup.SetupException;
|
||||
import com.github.gtache.autosubtitle.setup.SetupListener;
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.github.gtache.autosubtitle.modules.run;
|
||||
package com.github.gtache.autosubtitle.modules.gui.run;
|
||||
|
||||
import com.github.gtache.autosubtitle.modules.ffmpeg.FFmpegModule;
|
||||
import com.github.gtache.autosubtitle.modules.gui.fx.FXModule;
|
||||
import com.github.gtache.autosubtitle.modules.gui.impl.GuiCoreModule;
|
||||
import com.github.gtache.autosubtitle.modules.impl.CoreModule;
|
||||
import com.github.gtache.autosubtitle.modules.whisper.WhisperModule;
|
||||
import com.github.gtache.autosubtitle.modules.whisperx.WhisperXModule;
|
||||
import dagger.Component;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
|
||||
@@ -15,7 +15,7 @@ import javax.inject.Singleton;
|
||||
*/
|
||||
@Singleton
|
||||
@Component(modules = {CoreModule.class, GuiCoreModule.class, FXModule.class, FFmpegModule.class,
|
||||
WhisperModule.class, MissingComponentsModule.class})
|
||||
WhisperXModule.class, MissingComponentsModule.class})
|
||||
public interface RunComponent {
|
||||
|
||||
/**
|
||||
@@ -4,7 +4,9 @@
|
||||
module com.github.gtache.autosubtitle.run {
|
||||
requires com.github.gtache.autosubtitle.ffmpeg;
|
||||
requires com.github.gtache.autosubtitle.gui.fx;
|
||||
requires com.github.gtache.autosubtitle.whisper;
|
||||
requires com.github.gtache.autosubtitle.whisperx;
|
||||
requires javafx.fxml;
|
||||
requires javafx.graphics;
|
||||
|
||||
opens com.github.gtache.autosubtitle.run to javafx.graphics;
|
||||
opens com.github.gtache.autosubtitle.gui.run to javafx.graphics;
|
||||
}
|
||||
Reference in New Issue
Block a user