added method to get speechIDs from speaker

This commit is contained in:
s5260822 2025-03-22 22:02:08 +01:00
parent 25fc8b5480
commit ea68b3204b

View file

@ -730,4 +730,14 @@ public class MongoPprUtils {
Logger.info("Updating Metadata Collection: end");
}
public static List<String> getSpeechIdsBySpeakerId(String speakerId) {
List<String> speechIds = new ArrayList<>();
Document filter = new Document("speakerId", Integer.parseInt(speakerId));
List<Document> docs = getSpeechCollection().find(filter).into(new ArrayList<>());
for (Document doc : docs) {
speechIds.add(doc.getString("speechKey"));
}
return speechIds;
}
}