Skip to content

Commit 76783c6

Browse files
committed
refactor: remove audio - dependencies
#1944
1 parent 08aa90f commit 76783c6

16 files changed

+3
-201
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Deployments in production:
1616

1717
[<kbd>![](https://github.com/elimu-ai/webapp/assets/15718174/32f3c339-aacc-4dc1-9692-c9435bc63d57)</kbd>](https://hin.elimu.ai)
1818

19-
This web application hosts Android apps and educational content (e.g. texts, audio, videos, storybooks) for each supported language. Via the [elimu.ai Appstore](https://github.com/elimu-ai/appstore) application, the educational apps and content are downloaded from the website and installed on Android devices.
19+
This web application hosts Android apps and educational content (e.g. texts, words, videos, storybooks) for each supported language. Via the [elimu.ai Appstore](https://github.com/elimu-ai/appstore) application, the educational apps and content are downloaded from the website and installed on Android devices.
2020

2121
## REST API
2222

pom-dependency-tree.txt

-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ ai.elimu:webapp:war:2.5.35-SNAPSHOT
9090
| | \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
9191
| \- org.java-websocket:Java-WebSocket:jar:1.3.8:compile
9292
+- org.aspectj:aspectjweaver:jar:1.9.22.1:compile
93-
+- com.googlecode.soundlibs:jlayer:jar:1.0.1.4:compile
94-
+- com.googlecode.soundlibs:tritonus-share:jar:0.3.7.4:compile
95-
+- com.googlecode.soundlibs:mp3spi:jar:1.9.5.4:compile
96-
+- org.bitbucket.ijabz:jaudiotagger:jar:3.0.1:compile
9793
+- com.googlecode.texhyphj:texhyphj:jar:1.2:compile
9894
+- net.dongliu:apk-parser:jar:2.6.10:compile
9995
+- jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:jar:3.0.0:compile

pom.xml

-28
Original file line numberDiff line numberDiff line change
@@ -451,34 +451,6 @@
451451
<version>1.9.22.1</version>
452452
</dependency>
453453

454-
<!-- Audio -->
455-
<dependency>
456-
<groupId>com.googlecode.soundlibs</groupId>
457-
<artifactId>jlayer</artifactId>
458-
<version>1.0.1.4</version>
459-
<exclusions>
460-
<exclusion>
461-
<groupId>junit</groupId>
462-
<artifactId>junit</artifactId>
463-
</exclusion>
464-
</exclusions>
465-
</dependency>
466-
<dependency>
467-
<groupId>com.googlecode.soundlibs</groupId>
468-
<artifactId>tritonus-share</artifactId>
469-
<version>0.3.7.4</version>
470-
</dependency>
471-
<dependency>
472-
<groupId>com.googlecode.soundlibs</groupId>
473-
<artifactId>mp3spi</artifactId>
474-
<version>1.9.5.4</version>
475-
</dependency>
476-
<dependency>
477-
<groupId>org.bitbucket.ijabz</groupId>
478-
<artifactId>jaudiotagger</artifactId>
479-
<version>3.0.1</version>
480-
</dependency>
481-
482454
<dependency>
483455
<groupId>com.googlecode.texhyphj</groupId>
484456
<artifactId>texhyphj</artifactId>

src/main/java/ai/elimu/model/content/multimedia/Multimedia.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import lombok.Setter;
2424

2525
/**
26-
* Parent class for different types of multimedia (images, audios, etc).
26+
* Parent class for different types of multimedia (images, videos, etc).
2727
*/
2828
@Getter
2929
@Setter
@@ -33,7 +33,7 @@ public abstract class Multimedia extends Content {
3333
/**
3434
* The MIME type - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types
3535
* <p>
36-
* Example: "audio/mpeg"
36+
* Example: "video/mp4"
3737
*/
3838
@NotNull
3939
private String contentType;

src/main/java/ai/elimu/rest/v2/JpaToGsonConverter.java

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import ai.elimu.model.content.StoryBookParagraph;
1212
import ai.elimu.model.content.Number;
1313
import ai.elimu.model.content.Word;
14-
import ai.elimu.model.content.multimedia.Audio;
1514
import ai.elimu.model.content.multimedia.Image;
1615
import ai.elimu.model.content.multimedia.Video;
1716
import ai.elimu.model.v2.gson.application.ApplicationGson;

src/main/java/ai/elimu/util/audio/AudioMetadataExtractionHelper.java

-40
This file was deleted.

src/main/java/ai/elimu/util/audio/CrowdsourceHelper.java

-26
This file was deleted.

src/main/java/ai/elimu/util/csv/CsvSoundExtractionHelper.java

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public static List<Sound> getSoundsFromCsvBackup(File csvFile) {
4040
"id",
4141
"value_ipa",
4242
"value_sampa",
43-
"audio_id",
4443
"diacritic",
4544
"sound_type",
4645
"usage_count"

src/main/java/ai/elimu/util/db/DbContentImportHelper.java

-3
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ public synchronized void performDatabaseContentImport(Environment environment, L
234234
imageDao.create(image);
235235
}
236236

237-
// Extract and import Audios from CSV file in src/main/resources/
238-
// TODO
239-
240237
// Extract and import StoryBooks from CSV file in src/main/resources/
241238
File storyBooksCsvFile = new File(contentDirectory, "storybooks.csv");
242239
List<StoryBookGson> storyBookGsons = CsvContentExtractionHelper.getStoryBooksFromCsvBackup(storyBooksCsvFile);

src/main/java/ai/elimu/web/content/sound/SoundCsvExportController.java

-7
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public void handleRequest(
3838
"id",
3939
"value_ipa",
4040
"value_sampa",
41-
"audio_id",
4241
"diacritic",
4342
"sound_type",
4443
"usage_count"
@@ -47,15 +46,9 @@ public void handleRequest(
4746
CSVPrinter csvPrinter = new CSVPrinter(stringWriter, csvFormat);
4847

4948
for (Sound sound : sounds) {
50-
Long audioId = null;
51-
if (sound.getAudio() != null) {
52-
audioId = sound.getAudio().getId();
53-
}
54-
5549
csvPrinter.printRecord(sound.getId(),
5650
sound.getValueIpa(),
5751
sound.getValueSampa(),
58-
audioId,
5952
sound.isDiacritic(),
6053
sound.getSoundType(),
6154
sound.getUsageCount()

src/main/java/ai/elimu/web/content/word/WordEditController.java

-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import ai.elimu.model.content.StoryBookParagraph;
1515
import ai.elimu.model.content.Syllable;
1616
import ai.elimu.model.content.Word;
17-
import ai.elimu.model.content.multimedia.Audio;
1817
import ai.elimu.model.content.multimedia.Image;
1918
import ai.elimu.model.contributor.Contributor;
2019
import ai.elimu.model.contributor.WordContributionEvent;
@@ -95,7 +94,6 @@ public String handleRequest(
9594
model.addAttribute("wordInflections", wordDao.readInflections(word));
9695

9796
// Look up Multimedia content that has been labeled with this Word
98-
// TODO: labeled Audios
9997
List<Emoji> labeledEmojis = emojiDao.readAllLabeled(word);
10098
model.addAttribute("labeledEmojis", labeledEmojis);
10199
List<Image> labeledImages = imageDao.readAllLabeled(word);
@@ -144,7 +142,6 @@ public String handleSubmit(
144142
model.addAttribute("wordInflections", wordDao.readInflections(word));
145143

146144
// Look up Multimedia content that has been labeled with this Word
147-
// TODO: labeled Audios
148145
List<Emoji> labeledEmojis = emojiDao.readAllLabeled(word);
149146
model.addAttribute("labeledEmojis", labeledEmojis);
150147
List<Image> labeledImages = imageDao.readAllLabeled(word);

src/test/java/ai/elimu/util/audio/AudioMetadataExtractionHelperTest.java

-52
This file was deleted.

src/test/java/ai/elimu/util/audio/CrowdsourceHelperTest.java

-33
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)