Using Same Audio for 2 Collections

Northern Thai has 2 scripts, but the same audio for both. However, if we include the audio for both scripts (collections) in the app assets the app is 120 Mb larger with 2 copies of the same audio.

It would help a lot of both collections could reference the same audio and only 1 copy of the audio files be included in the assets, not 2 copies. We need to include the audio since most in our audience have only infrequent internet access.

If you can think of a way to do this in the current SAB, please let me know. Otherwise this could be a helpful SAB improvement for projects with 2 scripts and same audio.

Roger Green

The audio files shouldn’t get duplicated if they are the same and are imported with the same name. I remember that I had this problem a few years ago (perhaps in 2017!) and reported it to Richard. He fixed it and the audio wasn’t imported twice anymore. At the time, I was working on a Picture Story Book app with two book collections (two different scripts of the same text).
Actually, in September 2024 I updated another such app and the audio files were not duplicated. So it has been working. You are sure that you are using one and the same audio source in both collections, right?

The app is setup to use the same audio files for both collections. The audio is 128 MB. If the audio is included in the assets of only one collection the apk size is 128 MB smaller. If I include the same audio files for both collections, the apk is 128 MB larger than if included in the assets of of just one collection.

Could it be because the audio files a .3gp?

I will contact Richard for comment.

Thanks for sharing your experience. Hopefully a way can be found.

Roger

@rgreen620 If the duplicated audio files for your app come from the same folder location, they should only appear once in the app assets.

But if you have one book collection looking for the files in their original folder, and another book collection looking for the same files in the app data folder, then that could cause the duplicates.

To check this: inspect the .appDef file for the app and make sure the audio files and paths are exactly the same for each collection.

Go to Tools > Settings > Files and select either “Link to Files in current location” or “Copy files to app projects data folder”. Then delete all audio files from the app and add them again to make sure they are coming from a consistent source.

This works as you shared. Thank You. -RG

1 Like