How can I play a sound from time A to time B?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I play a sound from time A to time B?

Steve Thomas
So I figured out how to read in a paragraph of text and split it into separate words I can highlight as I read.  Still need to play around a bit to handle the different fonts/sizes and kerning.

Each word is its own Text object embedded in a Rectangle which "highlights" the words as I read.  I set the "highlight timing" by using the keyboard as I record the sound.  Then make minor adjustments as needed.  This will play fine in reading the whole sentence/paragraph.

But I want the user to be able to click on a word and hear that word spoken. Rather than re-record each word, I would like to be able to play a snippet of the recording.

So... How do a play a sound recorded in Etoys from time A to time B?

Cheers,
Stephen

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can I play a sound from time A to time B?

Mike Lee-12
Wow. That's exciting to hear!

I know from the wilds outside of Etoys that the typical approach to sync audio with tagged/structured text is with SMIL. This is simply a list of time stamps for the beginning and end of each word that is read by a compatible player app. The audio simply plays the sound as is and the associated SMIL list drives the moving text highlight. If, as you indicated, a click on a particular word can be captured, then it should be straightforward to have a script jump to the start of the sound for that word and just play that word.

It would be sweet if these time markers could be captured manually from within Etoys, perhaps in one of the sound tools then read by a script that links them to your named text blocks. Audacity can be used for this.

Generating the time stamps and tagging/structuring text for SMI-powered readalong content is almost always a labor intensive process unless one is using some kind of sophisticated audio pattern recognition capability.

Mike

Sent from my iPhone

On Jan 19, 2013, at 10:00 PM, Steve Thomas <[hidden email]> wrote:

> So I figured out how to read in a paragraph of text and split it into separate words I can highlight as I read.  Still need to play around a bit to handle the different fonts/sizes and kerning.
>
> Each word is its own Text object embedded in a Rectangle which "highlights" the words as I read.  I set the "highlight timing" by using the keyboard as I record the sound.  Then make minor adjustments as needed.  This will play fine in reading the whole sentence/paragraph.
>
> But I want the user to be able to click on a word and hear that word spoken. Rather than re-record each word, I would like to be able to play a snippet of the recording.
>
> So... How do a play a sound recorded in Etoys from time A to time B?
>
> Cheers,
> Stephen
> _______________________________________________
> etoys-dev mailing list
> [hidden email]
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can I play a sound from time A to time B?

Steve Thomas
Mike,

Actually my goal is to create something kids and their parents can use.  Where a child can tell a story (which is recorded).  Then the parent can type it in and the child and/or parent can work together to create the "word highlighted when its read" feature for that particular story.

So no SMIL/XML although the article you sent me (http://apex.infogridpacific.com/dcp/SMIL-production.html#rw-h3_67543-060614180) did give me some good points on the need for highlighting at the phrase/sentence/paragraph levels instead of just word level, depending on the needs of the learner.

Cheers,
Stephen
On Sat, Jan 19, 2013 at 10:35 PM, Mike Lee <[hidden email]> wrote:
It would be sweet if these time markers could be captured manually from within Etoys, perhaps in one of the sound tools then read by a script that links them to your named text blocks. Audacity can be used for this.



_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can I play a sound from time A to time B?

Harness, Kathleen
In reply to this post by Steve Thomas
Steve,
So. . . I look forward to seeing how this is done and giving it a try. You are very adept with Etoys, I hope I can understand what you are doing.
Thanks,
Kathleen

From: [hidden email] [[hidden email]] on behalf of Steve Thomas [[hidden email]]
Sent: Saturday, January 19, 2013 9:00 PM
To: etoys-dev; A friendly place to get answers to even the most basic questions about Squeak.
Subject: [etoys-dev] How can I play a sound from time A to time B?

So I figured out how to read in a paragraph of text and split it into separate words I can highlight as I read.  Still need to play around a bit to handle the different fonts/sizes and kerning.

Each word is its own Text object embedded in a Rectangle which "highlights" the words as I read.  I set the "highlight timing" by using the keyboard as I record the sound.  Then make minor adjustments as needed.  This will play fine in reading the whole sentence/paragraph.

But I want the user to be able to click on a word and hear that word spoken. Rather than re-record each word, I would like to be able to play a snippet of the recording.

So... How do a play a sound recorded in Etoys from time A to time B?

Cheers,
Stephen

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can I play a sound from time A to time B?

Karl Ramberg
In reply to this post by Steve Thomas
Open a graph on the sound. 
You may need to edit the sound to get a graph of it.
A graph is much like a holder so you can play sound from a sample location to another sample location. 

Keep an eye out for the length of the sound you load. I'm sure a long sound will be a big hog of memory and make your project sluggish.

Karl


On Sun, Jan 20, 2013 at 4:00 AM, Steve Thomas <[hidden email]> wrote:
So I figured out how to read in a paragraph of text and split it into separate words I can highlight as I read.  Still need to play around a bit to handle the different fonts/sizes and kerning.

Each word is its own Text object embedded in a Rectangle which "highlights" the words as I read.  I set the "highlight timing" by using the keyboard as I record the sound.  Then make minor adjustments as needed.  This will play fine in reading the whole sentence/paragraph.

But I want the user to be able to click on a word and hear that word spoken. Rather than re-record each word, I would like to be able to play a snippet of the recording.

So... How do a play a sound recorded in Etoys from time A to time B?

Cheers,
Stephen

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev



_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can I play a sound from time A to time B?

Steve Thomas
Karl,

I did try that not sure how much that will help.  I even thought of trying to walk through the "sound" and check volume levels, but not sure how well that will work.  Might help as a first approximation, but would require I figure out how to get the sound and walk through the levels by time slices. If you code provide a code snippet, that would be nice :)

I also tried key strokes to set the start/end times, but timing the keystrokes proved really hard to do.

Basically each word is in a "Text Rectangle" and each "Text Rectangle" has a start and end time variables to know when to "highlight" the word.

I wound up using a piano roll type approach, where I have my "cursor" move across the piano roll and when it detects a color under, it sets a words start/end times.  That worked fairly well, but really the hard part is word timing.  Phrase (highlighting groups of words) timing is a lot easier. 

In any case I'll probably share something later this week to get some feedback on what might be simplest for kids (old and young) to use.

Stephen

On Mon, Jan 28, 2013 at 4:02 PM, karl ramberg <[hidden email]> wrote:
Open a graph on the sound. 
You may need to edit the sound to get a graph of it.
A graph is much like a holder so you can play sound from a sample location to another sample location. 

Keep an eye out for the length of the sound you load. I'm sure a long sound will be a big hog of memory and make your project sluggish.

Karl


On Sun, Jan 20, 2013 at 4:00 AM, Steve Thomas <[hidden email]> wrote:
So I figured out how to read in a paragraph of text and split it into separate words I can highlight as I read.  Still need to play around a bit to handle the different fonts/sizes and kerning.

Each word is its own Text object embedded in a Rectangle which "highlights" the words as I read.  I set the "highlight timing" by using the keyboard as I record the sound.  Then make minor adjustments as needed.  This will play fine in reading the whole sentence/paragraph.

But I want the user to be able to click on a word and hear that word spoken. Rather than re-record each word, I would like to be able to play a snippet of the recording.

So... How do a play a sound recorded in Etoys from time A to time B?

Cheers,
Stephen

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev




_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev