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: 4084
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 »

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
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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 »

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
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
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 »

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
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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 »

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
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
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 »

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
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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 »

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
Software > Drama • https://www.patreon.com/renpytom

User avatar
usul
Veteran
Posts: 415
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 »

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: 4084
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 »

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
computer games

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 »

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.

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 »

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: 4084
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 »

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

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 »

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