[Speex-dev] How to use Speex Cross-Browser, Cross-Platform on Web Pages

Alex S. Brown alexsbrown at alexsbrown.com
Mon Feb 20 15:45:56 PST 2006


Thanks for the two suggestions. I tried VLC, and that did help with Firefox
support. Unfortunately, VLC registers itself as a player only for the
"application/ogg" type, not for "audio/x-speex". If I change my object code to
request an application/ogg MIME type, it plays. I wish that it also showed
player controls like QuickTime and other players do, but I am not complaining!
VLC is Javascript capable, so I can drive the audio from the web page. Let me
know if there are any potential problems with using application/ogg as the MIME
type, since it may be better recognized.

I downloaded the jspeex package. I am not so familiar with Java, so it will take
a bit longer for me to figure out how to work this in.

I looked at the ogg multimedia container, and I do think that images+audio could
work well. Most other multimedia formats (besides flash) are very inefficient
about the images, treating them as video even if they rarely change. I am
trying to stay with HTML-based methods, so I can use hyperlinks and other
techniques. The W3C Slidy approach also allows you to fall back gracefully for
users who do not have a fancy browser with full plug-in support. Player support
is so uneven in this area that it becomes very hard to support most users most
of the time. Microsoft has its HTML+time that would be OK, SMIL (synchronized
multimedia) would be great, and OGG could also do the trick. My main trouble is
trying to stitch something together that I can maintain easily and that most
users need few plug-ins for!

Thanks for the quick replies. Hopefully my experiments will help other speex
users.

--Alex

Quoting Conrad Parker <conrad at metadecks.org>:

> On Tue, Feb 21, 2006 at 09:21:32AM +1100, Jean-Marc Valin wrote:
> > Have you thought of using jspeex (http://jspeex.sourceforge.net/)? The
> > other way I can think of is to do the same as the Annodex Firefox plugin
> > (http://www.annodex.net) and use VLC. Conrad Parker might have some more
> > info on how to do that. Conrad?
> 
> Hi,
> 
> AFE currently has a bug where it can't handle audio-only files.
> Hopefully we'll fix that soon.
> 
> Nevertheless, something like jspeex sounds better for this at the
> moment. Cooler would be a way of doing timed images + speex in ogg ...
> 
> Conrad.
> 
> > 	Jean-Marc
> > 
> > Le lundi 20 février 2006 à 14:50 -0500, Alex S. Brown a écrit :
> > > My apologies if this request is a little outside the scope of the normal
> track
> > > of this discussion group. My question is more about the use of speex as a
> web
> > > developer than about the internals of the codec. I searched all over the
> web
> > > for this information, though, and am trying here as a last resort.
> > > 
> > > I am trying to develop a way to offer slide shows with a voice-over. I
> would
> > > like to offer speex as a low-bandwidth option in addition to MP3 and
> possibly
> > > WAV formats. I am struggling to figure out how to support the
> "audio/x-speex"
> > > mime type across browsers effectively.
> > > 
> > > Ironically, the one where I have had best success is with Windows Media
> Player.
> > > Once the DirectShow filters are installed on a PC, I use the <object> tag
> to
> > > invoke Windows Media Player, and it happily plays the speex file. (Ironic
> that
> > > this is the least-standard-compliant, least-open-source combination of
> web
> > > browser and OS, and the only one where I can get speex working!)
> > > 
> > > I would like to be able to bring up a player with the correct, HTML 4.01
> > > approach, that should support any browser that recognizes the MIME type
> and the
> > > correct use of the object tag. The tag looks like this:
> > > 
> > > <object type="audio/x-speex" data="myaudio.spx">
> > > If your browser does not support a player object, <a
> href="myaudio.spx">download
> > > the speech</a> and play it separately.
> > > </object>
> > > 
> > > (The main object tag gives the mime type and file location. The text
> between it
> > > and the close is an alternate rendering, for browsers that cannot display
> the
> > > object tag.)
> > > 
> > > My problem is that I am not sure which speex players will properly
> register the
> > > MIME type with the web browser and operating system, so that a ".spx"
> file will
> > > play and so that the "audio/x-speex" MIME type creates a player object.
> > > 
> > > I have tried using Firefox under MS Windows, and Firefox does not even
> recognize
> > > the MIME type at all, even after installing DirectShow filters. It does
> not
> > > even know what to offer to download.
> > > 
> > > I am happy to give separate tech support instructions for different
> browsers and
> > > operating systems, because my hope is that people will keep coming back
> to my
> > > site for educational information. I may offer WAV or MP3 formats for
> more
> > > casual users, or perhaps just short "teasers" to get them to download
> the
> > > decoders for the more efficient speex format.
> > > 
> > > My hope is by getting an answer to this question, I can help promote the
> use of
> > > speex on the web. I certainly plan to send any solutions to the Firefox
> team,
> > > so that they recognize and offer to download players for the speex MIME
> type in
> > > the future.


----------------------
Alex S. Brown, PMP
alexsbrown at alexsbrown.com
http://www.alexsbrown.com/


More information about the Speex-dev mailing list