speex support (just an idea)

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
jack_norton
Lemma-Class Veteran
Posts: 3978
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

speex support (just an idea)

#1 Post by jack_norton » Mon Jun 01, 2009 2:41 am

It's just an idea of course. I found out this open source codec that works *very well* for voices (did some tests and reduces text lines much better than ogg).
http://www.speex.org/
Problem is that needs to be added to renpy, but I found that there are already some python bindings:
http://www.freenet.org.nz/python/pySpeex/

of course it's completely up to PyTom if he wants to add it. I don't know how many people here use voices in their games, but since they're quite common in VNs, I think might be a very nice feature to add! 8)
follow me on Image Image Image Image
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 15223
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: speex support (just an idea)

#2 Post by PyTom » Mon Jun 01, 2009 3:02 am

I actually removed it a while back, since nobody used it and it was moderately large. Also, the most speex files were low quality... have you found settings that make them sound better than vorbis at the same bitrate?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 3978
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: speex support (just an idea)

#3 Post by jack_norton » Mon Jun 01, 2009 4:02 am

Hm true, I looked better at the website. Seems like the "best" setting they suggest is at 32khz. I made some tests but really even for voiceovers (especially female voices) you need to use 44khz otherwise sounds bad on high pitches like when screaming/yelling (I can notice it immediately).
Well there's no solution for Bionic Heart then, 25mb of voiceovers :mrgreen: but at least managed to do the download-file from within Renpy work!
follow me on Image Image Image Image
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 15223
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: speex support (just an idea)

#4 Post by PyTom » Mon Jun 01, 2009 12:15 pm

What are you using for the voices? Vorbis?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 3978
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: speex support (just an idea)

#5 Post by jack_norton » Mon Jun 01, 2009 12:26 pm

Yes, I use oggdropXpd (that fun thing where you drag&drop the files). Actually the fact is that there's lot of text in the game. Only the demo, is 40:28 of voices with over 700+ files (and isn't yet 100% voiced, but like 90%)!!
follow me on Image Image Image Image
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 15223
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: speex support (just an idea)

#6 Post by PyTom » Mon Jun 01, 2009 12:38 pm

I suspect that a reasonable amount of size could be saved by proper conversion of the voice files. For example, voice is generally coming from the center of the screen, so it might not be inappropriate to convert it to mono rather then stereo. I also find that vorbis often retains a reasonable amount of quality even at relatively low settings.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
usul
Veteran
Posts: 413
Joined: Mon Oct 29, 2007 12:35 pm
Projects: Teachings of the Buddha, System-Addict, Generation XxX
Location: Quebec
Contact:

Re: speex support (just an idea)

#7 Post by usul » Mon Jun 01, 2009 1:04 pm

As I understand it speex is usefull for listening to talks, but isn't meant to preserve quality of sound (cuts highs and lows I believe). So if you want to character actor's voices clear you might want to stick with vorbis.
"The universe is non-simultaneously apprehended"
— Buckminster Fuller

User avatar
jack_norton
Lemma-Class Veteran
Posts: 3978
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: speex support (just an idea)

#8 Post by jack_norton » Mon Jun 01, 2009 1:06 pm

PyTom wrote:I suspect that a reasonable amount of size could be saved by proper conversion of the voice files. For example, voice is generally coming from the center of the screen, so it might not be inappropriate to convert it to mono rather then stereo. I also find that vorbis often retains a reasonable amount of quality even at relatively low settings.
Yes of course I've converted all sounds to mono :)
I tried compressing with oggenc at quality setting 2. If I go below, like 1 or 0, especially on female voices, the difference is very noticeable (I can notice it with just normal speakers). I might try with male voices though, could work better.
follow me on Image Image Image Image
computer games

User avatar
delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: speex support (just an idea)

#9 Post by delta » Mon Jun 01, 2009 3:43 pm

Voices are and will always be huge. Voice codecs like Speex are optimized for being understandable, not high fidelity - using them in a game will kill immersion.
The rest is left as an exercise for the reader.

User avatar
EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: speex support (just an idea)

#10 Post by EvilDragon » Wed Jun 03, 2009 1:58 pm

And then again, if size doesn't matter, you can always use MP3 rather than Vorbis, because the fidelity is a bit better :)
Angels of paradise, angels of sacrifice
Please let me be under your wings...

User avatar
jack_norton
Lemma-Class Veteran
Posts: 3978
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: speex support (just an idea)

#11 Post by jack_norton » Wed Jun 03, 2009 2:04 pm

Unfortunately can't, since mp3 is a pain for commercial stuff :x
follow me on Image Image Image Image
computer games

User avatar
EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: speex support (just an idea)

#12 Post by EvilDragon » Fri Jun 12, 2009 5:25 am

How come, if you just use LAME codec?
Angels of paradise, angels of sacrifice
Please let me be under your wings...

Post Reply

Who is online

Users browsing this forum: No registered users