Not able to use sound in Mit app inventor

Greetings, Taifun,
I read your message on the sound use in Mit app inventor. I am facing the same problem but the more I try to solve it, the more the problem gets bigger!!
Can you guide me for this project?

Hima

Welcome
What exactly is the issue? Please elaborate . .
To play a sound, which is longer than a few seconds, use the Player component

Taifun

Actually, the problem is that even though the sound is only a second long it is not responding to the app!! I tried re-uploading the sound a couple of times and even replaced the sound component still it is not able to play the sound. I even checked the mp3 file. It is correct but still it is not working. Every time I play it, it says " Not able to play sound: Error 703.
I am on a project to demonstrate a reading app for children which also teaches children how to spell alphabets and numbers. Also, the page where the sound component is not working has 10 other same numbers from 21 to 30 whose sound component is also not working. Kindly guide me out of this problem.

Hima

Try a aearch Search results for '703' - MIT App Inventor Community

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Use only one sound or player component and set the source before playing
Also only 1 image component would be sufficient ...

Taifun

2 Likes

Sorry to interrupt you but Each button symbolizes separate number.
I also have done this on the screen before this one and it works but the problem is that even though both screens have the same code, this screen does not play the sound and the first one does!
You can see the code for the previous screen too.

Hima

reuse your components!
and follow DRY principle - Don't repeat yourself

still using n buttons
unknown

and replacing all the buttons with a listpicker
unknown2

Taifun

2 Likes

You are using many screens (at least nine), many Sound player components and are trying to pass information between screens. This makes your coding more complex than necessary to achieve your goal.

How large are your mp3 sound files? You probably should be using the Player component. Where are you storing your sound files? In media? There is a limit to how many Mb of data you can store in Media without using special coding.

How large are your image files? here is a limit to how many Mb of data you can store in Media without using special coding.

Well Greetings Steve, My mp3 file's are not more than a second long which means they might range between 14 to 19KB.

Hima

Thank you very much Taifun. I will never forget this help you have done to me! But can you explain briefly the code you have used ?
:slightly_smiling_face:

Hima

@Hima

  1. Drag Player component to Designer (in each Screen) »


  1. Use Blocks as this »

image


  1. Check in Windows Explorer the BitRate of your *.MP3

AI2 don't play some BitRates...

Check the BitRate of the *.mp3 that works fine for you... and adapt the other audios to the same BitRate in applications like 'Audacity' or online converters...


  1. Export your project to *.aia file and post here (to check the size of your *.mp3) »

image

:pray:

Lito

@>-->---

Still not understood :neutral_face:

for sound ,please use Sound

At the moment, many of the community developers are providing advice which is good but also confusing. What you appear to do now is to learn how to code. The resources below may help you to understand what you need to do.

Learn to code.

Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

How to do a lot of basic things with App Inventor are described here: How do you...? .

Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | imagnity for more tutorials including Imagnity.com List Tutorial, Mirrored - @Saj

Learn about components Component Reference
and visit the Library The MIT App Inventor Library: Documentation & Support Help>Library on the MENU

A tutorial using the Sound component and many files to display a lot of images.

You want to demonstrate a reading app for children which also teaches children how to spell alphabets and numbers. Also, the page where the sound component is not working has 10 other same numbers from 21 to 30 whose sound component is also not working. The Project below uses some code that is similar to what you hope to write.

It uses advanced techniques described in the pdf link that you might find useful in your Project.

Thank you very much
:slightly_smiling_face:

Hima

12 posts were split to a new topic: The advantages of using Sound Component instead of Player Component?