Compare commits
5 commits
6f36719795
...
cb096388c8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb096388c8 | ||
|
|
227ee981a3 | ||
|
|
6297477e29 | ||
|
|
61003eb84c | ||
|
|
6db87d119d |
6 changed files with 98 additions and 25 deletions
24
README.md
24
README.md
|
|
@ -28,6 +28,7 @@ make -j$(nproc)
|
|||
|
||||
## Building
|
||||
|
||||
### Linux / macOS
|
||||
```bash
|
||||
git clone https://github.com/IMbackK/aceradio.git
|
||||
cd aceradio
|
||||
|
|
@ -36,6 +37,29 @@ cmake ..
|
|||
make -j$(nproc)
|
||||
```
|
||||
|
||||
### Windows (Qt6 + CMake)
|
||||
|
||||
To build on Windows, ensure you have **CMake** and **Qt6** installed. Run the following commands in **Command Prompt (cmd)** or **PowerShell**:
|
||||
|
||||
1. **Configure and Build:**
|
||||
```cmd
|
||||
git clone https://github.com/IMbackK/aceradio.git
|
||||
cd aceradio
|
||||
mkdir build
|
||||
cmake -B build -DCMAKE_PREFIX_PATH="C:/Qt/6.x.x/msvc2019_64"
|
||||
|
||||
# Use --parallel to build using all CPU cores
|
||||
# Or use -j N (e.g., -j 4) to limit the number of threads
|
||||
cmake --build build --config Release --parallel
|
||||
```
|
||||
Note: Replace C:/Qt/6.x.x/msvc2019_64 with your actual Qt installation path.
|
||||
|
||||
2. **Deploy Dependencies:**
|
||||
Run windeployqt to copy necessary Qt libraries to the build folder:
|
||||
```cmd
|
||||
"C:\Qt\6.x.x\msvc2019_64\bin\windeployqt.exe" --no-translations build\Release\aceradio.exe
|
||||
```
|
||||
|
||||
## Setup Paths:
|
||||
|
||||
Go to settings->Ace Step->Model Paths and add the paths to the acestep.cpp binaries the models.
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@ AceStep::AceStep(QObject* parent): QObject(parent)
|
|||
connect(&ditVaeProcess, &QProcess::finished, this, &AceStep::ditProcFinished);
|
||||
}
|
||||
|
||||
bool AceStep::isGenerateing(SongItem* song)
|
||||
bool AceStep::isGenerating(SongItem* song)
|
||||
{
|
||||
if(!busy && song)
|
||||
*song = this->request.song;
|
||||
return busy;
|
||||
}
|
||||
|
||||
void AceStep::cancleGenerateion()
|
||||
void AceStep::cancelGeneration()
|
||||
{
|
||||
qwenProcess.blockSignals(true);
|
||||
qwenProcess.terminate();
|
||||
|
|
@ -39,7 +39,7 @@ void AceStep::cancleGenerateion()
|
|||
|
||||
progressUpdate(100);
|
||||
if(busy)
|
||||
generationCancled(request.song);
|
||||
generationCanceled(request.song);
|
||||
|
||||
busy = false;
|
||||
}
|
||||
|
|
@ -50,18 +50,18 @@ bool AceStep::requestGeneration(SongItem song, QString requestTemplate, QString
|
|||
{
|
||||
if(busy)
|
||||
{
|
||||
qWarning()<<"Droping song:"<<song.caption;
|
||||
qWarning()<<"Dropping song:"<<song.caption;
|
||||
return false;
|
||||
}
|
||||
busy = true;
|
||||
|
||||
request = {song, QRandomGenerator::global()->generate(), aceStepPath, textEncoderModelPath, ditModelPath, vaeModelPath};
|
||||
|
||||
QString qwen3Binary = aceStepPath + "/ace-qwen3";
|
||||
QString qwen3Binary = aceStepPath + "/ace-lm" + EXE_EXT;
|
||||
QFileInfo qwen3Info(qwen3Binary);
|
||||
if (!qwen3Info.exists() || !qwen3Info.isExecutable())
|
||||
{
|
||||
generationError("ace-qwen3 binary not found at: " + qwen3Binary);
|
||||
generationError("ace-lm binary not found at: " + qwen3Binary);
|
||||
busy = false;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -136,16 +136,16 @@ void AceStep::qwenProcFinished(int code, QProcess::ExitStatus status)
|
|||
if(code != 0)
|
||||
{
|
||||
QString errorOutput = qwenProcess.readAllStandardError();
|
||||
generationError("dit-vae exited with code " + QString::number(code) + ": " + errorOutput);
|
||||
generationError("ace-lm exited with code " + QString::number(code) + ": " + errorOutput);
|
||||
busy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
QString ditVaeBinary = request.aceStepPath + "/dit-vae";
|
||||
QString ditVaeBinary = request.aceStepPath + "/ace-synth" + EXE_EXT;
|
||||
QFileInfo ditVaeInfo(ditVaeBinary);
|
||||
if (!ditVaeInfo.exists() || !ditVaeInfo.isExecutable())
|
||||
{
|
||||
generationError("dit-vae binary not found at: " + ditVaeBinary);
|
||||
generationError("ace-synth binary not found at: " + ditVaeBinary);
|
||||
busy = false;
|
||||
return;
|
||||
}
|
||||
|
|
@ -153,7 +153,7 @@ void AceStep::qwenProcFinished(int code, QProcess::ExitStatus status)
|
|||
request.requestLlmFilePath = tempDir + "/request_" + QString::number(request.uid) + "0.json";
|
||||
if (!QFileInfo::exists(request.requestLlmFilePath))
|
||||
{
|
||||
generationError("ace-qwen3 failed to create enhaced request file "+request.requestLlmFilePath);
|
||||
generationError("ace-lm failed to create enhanced request file "+request.requestLlmFilePath);
|
||||
busy = false;
|
||||
return;
|
||||
}
|
||||
|
|
@ -175,12 +175,13 @@ void AceStep::qwenProcFinished(int code, QProcess::ExitStatus status)
|
|||
}
|
||||
}
|
||||
|
||||
// Step 2: Run dit-vae to generate audio
|
||||
// Step 2: Run ace-synth to generate audio
|
||||
QStringList ditVaeArgs;
|
||||
ditVaeArgs << "--request"<<request.requestLlmFilePath;
|
||||
ditVaeArgs << "--text-encoder"<<request.textEncoderModelPath;
|
||||
ditVaeArgs << "--dit"<<request.ditModelPath;
|
||||
ditVaeArgs << "--vae"<<request.vaeModelPath;
|
||||
ditVaeArgs << "--wav";
|
||||
|
||||
progressUpdate(60);
|
||||
|
||||
|
|
@ -193,7 +194,7 @@ void AceStep::ditProcFinished(int code, QProcess::ExitStatus status)
|
|||
if (code != 0)
|
||||
{
|
||||
QString errorOutput = ditVaeProcess.readAllStandardError();
|
||||
generationError("dit-vae exited with code " + QString::number(code) + ": " + errorOutput);
|
||||
generationError("ace-synth exited with code " + QString::number(code) + ": " + errorOutput);
|
||||
busy = false;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@
|
|||
|
||||
#include "SongItem.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
inline const QString EXE_EXT = ".exe";
|
||||
#else
|
||||
inline const QString EXE_EXT = "";
|
||||
#endif
|
||||
|
||||
class AceStep : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -39,7 +45,7 @@ class AceStep : public QObject
|
|||
|
||||
signals:
|
||||
void songGenerated(SongItem song);
|
||||
void generationCancled(SongItem song);
|
||||
void generationCanceled(SongItem song);
|
||||
void generationError(QString error);
|
||||
void progressUpdate(int progress);
|
||||
|
||||
|
|
@ -50,8 +56,8 @@ public slots:
|
|||
|
||||
public:
|
||||
AceStep(QObject* parent = nullptr);
|
||||
bool isGenerateing(SongItem* song = nullptr);
|
||||
void cancleGenerateion();
|
||||
bool isGenerating(SongItem* song = nullptr);
|
||||
void cancelGeneration();
|
||||
|
||||
private slots:
|
||||
void qwenProcFinished(int code, QProcess::ExitStatus status);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
connect(audioPlayer, &AudioPlayer::positionChanged, this, &MainWindow::updatePosition);
|
||||
connect(audioPlayer, &AudioPlayer::durationChanged, this, &MainWindow::updateDuration);
|
||||
connect(aceStep, &AceStep::songGenerated, this, &MainWindow::songGenerated);
|
||||
connect(aceStep, &AceStep::generationCancled, this, &MainWindow::generationCanceld);
|
||||
connect(aceStep, &AceStep::generationCanceled, this, &MainWindow::generationCanceld);
|
||||
connect(aceStep, &AceStep::generationError, this, &MainWindow::generationError);
|
||||
connect(aceStep, &AceStep::progressUpdate, ui->progressBar, &QProgressBar::setValue);
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
aceStep->cancleGenerateion();
|
||||
aceStep->cancelGeneration();
|
||||
|
||||
autoSavePlaylist();
|
||||
saveSettings();
|
||||
|
|
@ -523,7 +523,7 @@ void MainWindow::ensureSongsInQueue(bool enqeueCurrent)
|
|||
|
||||
SongItem lastSong;
|
||||
SongItem workerSong;
|
||||
if(aceStep->isGenerateing(&workerSong))
|
||||
if(aceStep->isGenerating(&workerSong))
|
||||
lastSong = workerSong;
|
||||
else if(!generatedSongQueue.empty())
|
||||
lastSong = generatedSongQueue.last();
|
||||
|
|
@ -553,7 +553,7 @@ void MainWindow::ensureSongsInQueue(bool enqeueCurrent)
|
|||
void MainWindow::flushGenerationQueue()
|
||||
{
|
||||
generatedSongQueue.clear();
|
||||
aceStep->cancleGenerateion();
|
||||
aceStep->cancelGeneration();
|
||||
isGeneratingNext = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,14 +24,56 @@ SongDialog::SongDialog(QWidget *parent, const QString &caption, const QString &l
|
|||
// Setup vocal language combo box
|
||||
ui->vocalLanguageCombo->addItem("--", ""); // Unset
|
||||
ui->vocalLanguageCombo->addItem("English (en)", "en");
|
||||
ui->vocalLanguageCombo->addItem("German (de)", "de");
|
||||
ui->vocalLanguageCombo->addItem("French (fr)", "fr");
|
||||
ui->vocalLanguageCombo->addItem("Spanish (es)", "es");
|
||||
ui->vocalLanguageCombo->addItem("Japanese (ja)", "ja");
|
||||
ui->vocalLanguageCombo->addItem("Chinese (zh)", "zh");
|
||||
ui->vocalLanguageCombo->addItem("Italian (it)", "it");
|
||||
ui->vocalLanguageCombo->addItem("Japanese (ja)", "ja");
|
||||
ui->vocalLanguageCombo->addItem("Korean (ko)", "ko");
|
||||
ui->vocalLanguageCombo->addItem("Spanish (es)", "es");
|
||||
ui->vocalLanguageCombo->addItem("French (fr)", "fr");
|
||||
ui->vocalLanguageCombo->addItem("German (de)", "de");
|
||||
ui->vocalLanguageCombo->addItem("Portuguese (pt)", "pt");
|
||||
ui->vocalLanguageCombo->addItem("Russian (ru)", "ru");
|
||||
ui->vocalLanguageCombo->addItem("Italian (it)", "it");
|
||||
ui->vocalLanguageCombo->addItem("Arabic (ar)", "ar");
|
||||
ui->vocalLanguageCombo->addItem("Azerbaijani (az)", "az");
|
||||
ui->vocalLanguageCombo->addItem("Bulgarian (bg)", "bg");
|
||||
ui->vocalLanguageCombo->addItem("Bengali (bn)", "bn");
|
||||
ui->vocalLanguageCombo->addItem("Catalan (ca)", "ca");
|
||||
ui->vocalLanguageCombo->addItem("Czech (cs)", "cs");
|
||||
ui->vocalLanguageCombo->addItem("Danish (da)", "da");
|
||||
ui->vocalLanguageCombo->addItem("Greek (el)", "el");
|
||||
ui->vocalLanguageCombo->addItem("Persian (fa)", "fa");
|
||||
ui->vocalLanguageCombo->addItem("Finnish (fi)", "fi");
|
||||
ui->vocalLanguageCombo->addItem("Hebrew (he)", "he");
|
||||
ui->vocalLanguageCombo->addItem("Hindi (hi)", "hi");
|
||||
ui->vocalLanguageCombo->addItem("Croatian (hr)", "hr");
|
||||
ui->vocalLanguageCombo->addItem("Haitian Creole (ht)", "ht");
|
||||
ui->vocalLanguageCombo->addItem("Hungarian (hu)", "hu");
|
||||
ui->vocalLanguageCombo->addItem("Indonesian (id)", "id");
|
||||
ui->vocalLanguageCombo->addItem("Icelandic (is)", "is");
|
||||
ui->vocalLanguageCombo->addItem("Latin (la)", "la");
|
||||
ui->vocalLanguageCombo->addItem("Lithuanian (lt)", "lt");
|
||||
ui->vocalLanguageCombo->addItem("Malay (ms)", "ms");
|
||||
ui->vocalLanguageCombo->addItem("Nepali (ne)", "ne");
|
||||
ui->vocalLanguageCombo->addItem("Dutch (nl)", "nl");
|
||||
ui->vocalLanguageCombo->addItem("Norwegian (no)", "no");
|
||||
ui->vocalLanguageCombo->addItem("Punjabi (pa)", "pa");
|
||||
ui->vocalLanguageCombo->addItem("Polish (pl)", "pl");
|
||||
ui->vocalLanguageCombo->addItem("Romanian (ro)", "ro");
|
||||
ui->vocalLanguageCombo->addItem("Sanskrit (sa)", "sa");
|
||||
ui->vocalLanguageCombo->addItem("Slovak (sk)", "sk");
|
||||
ui->vocalLanguageCombo->addItem("Serbian (sr)", "sr");
|
||||
ui->vocalLanguageCombo->addItem("Swedish (sv)", "sv");
|
||||
ui->vocalLanguageCombo->addItem("Swahili (sw)", "sw");
|
||||
ui->vocalLanguageCombo->addItem("Tamil (ta)", "ta");
|
||||
ui->vocalLanguageCombo->addItem("Telugu (te)", "te");
|
||||
ui->vocalLanguageCombo->addItem("Thai (th)", "th");
|
||||
ui->vocalLanguageCombo->addItem("Tagalog (tl)", "tl");
|
||||
ui->vocalLanguageCombo->addItem("Turkish (tr)", "tr");
|
||||
ui->vocalLanguageCombo->addItem("Ukrainian (uk)", "uk");
|
||||
ui->vocalLanguageCombo->addItem("Urdu (ur)", "ur");
|
||||
ui->vocalLanguageCombo->addItem("Vietnamese (vi)", "vi");
|
||||
ui->vocalLanguageCombo->addItem("Cantonese (yue)", "yue");
|
||||
ui->vocalLanguageCombo->addItem("Unknown", "unknown");
|
||||
|
||||
// Set current language if provided
|
||||
if (!vocalLanguage.isEmpty())
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public:
|
|||
inline SongItem(const QString &caption = "", const QString &lyrics = "")
|
||||
: caption(caption), lyrics(lyrics)
|
||||
{
|
||||
// Generate a unique ID using cryptographically secure random number
|
||||
// Generate a unique ID using a cryptographically secure random number
|
||||
uniqueId = QRandomGenerator::global()->generate64();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue