| 45 | } |
| 46 | |
| 47 | const QStringList SamInterface::getInstalledModels() |
| 48 | { |
| 49 | QString modelDirectory = modelFolder(); |
| 50 | if (modelDirectory.isEmpty()) { |
| 51 | qDebug() << "=== /// CANNOT ACCESS SPEECH DICTIONARIES FOLDER"; |
| 52 | return {}; |
| 53 | } |
| 54 | QDir modelsFolder(modelDirectory); |
| 55 | QStringList installedModels; |
| 56 | QStringList files = modelsFolder.entryList({QStringLiteral("*.pt")}, QDir::Files); |
| 57 | for (auto &f : files) { |
| 58 | installedModels << modelsFolder.absoluteFilePath(f); |
| 59 | } |
| 60 | return installedModels; |
| 61 | } |
| 62 | |
| 63 | bool SamInterface::installNewModel(const QString &) |
| 64 | { |
no test coverage detected