ev3 Is it possible to play back images and sounds in Lejos?

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

smart_app123
New User
Posts: 18
Joined: Thu Jan 11, 2018 11:35 am

ev3 Is it possible to play back images and sounds in Lejos?

Postby smart_app123 » Tue Apr 03, 2018 5:58 am

I used EV3 LCD to display the desired image on ev3python and tried to play the sound using sound.speak () function. Is this possible in Lejos?

User avatar
gloomyandy
leJOS Team Member
Posts: 6017
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: ev3 Is it possible to play back images and sounds in Lejos?

Postby gloomyandy » Tue Apr 03, 2018 8:46 am

You can display images that are in the correct format (we supply a tool that will convert them) but you can not directly display say a jpg image. See:
http://www.lejos.org/ev3/docs/lejos/har ... t-int-int-
http://www.lejos.org/ev3/docs/lejos/har ... Image.html
https://sourceforge.net/p/lejos/wiki/Us ... C%20tools/
viewtopic.php?t=4605

You can also playback sounds that have been encoded into a simple .wav format file. Again this file must be of the correct format for leJOS the API doc gives this format: http://www.lejos.org/ev3/docs/lejos/har ... a.io.File-

We do not provide an API that allows you to convert text to speech.
leJOS news https://lejosnews.wordpress.com/

User avatar
esmetaman
Advanced Member
Posts: 369
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes
Contact:

Re: ev3 Is it possible to play back images and sounds in Lejos?

Postby esmetaman » Tue Apr 03, 2018 8:43 pm

Hi,
Using this Java library in top of EV3Dev, it is possible.

Review this examples:
https://github.com/ev3dev-lang-java/exa ... /actuators

Indeed, this class uses a PNG:
https://github.com/ev3dev-lang-java/ev3 ... /resources
https://github.com/ev3dev-lang-java/ev3 ... ckman.java

Cheers

Juan Antonio
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://ev3dev-lang-java.github.io/#/
https://github.com/jabrena/livingrobots

smart_app123
New User
Posts: 18
Joined: Thu Jan 11, 2018 11:35 am

Re: ev3 Is it possible to play back images and sounds in Lejos?

Postby smart_app123 » Wed Apr 04, 2018 4:53 am

Thanks for the reply.
The EV3DevPlatforms extension of the Brickman example
Shell.class
Where is the file ..?


Return to “EV3 Software”

Who is online

Users browsing this forum: No registered users and 1 guest