Trying Automatic Voice [Solved]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Lightworker
Regular
Posts: 100
Joined: Sun Dec 13, 2015 2:06 pm
Projects: Detroit.exe
Skype: badthai
Contact:

Trying Automatic Voice [Solved]

#1 Post by Lightworker » Sat Aug 06, 2016 5:59 pm

How to use Renpy's automatic voice?
So, I added this code to my options.rpy.

Code: Select all

config.auto_voice = "voice/{id}.ogg"
However, after renaming the voice flies to match the identifier. Such as start_24b2e8df.ogg, it is still not playing in the game.
What am I doing wrong here?
The file is in the game directory.
It has the same identifier from the spreadsheet.
Last edited by Lightworker on Wed Aug 10, 2016 12:44 pm, edited 1 time in total.

User avatar
IrinaLazareva
Veteran
Posts: 374
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: IKG
Location: St.Petersburg, Russia
Contact:

Re: Trying Automatic Voice

#2 Post by IrinaLazareva » Sun Aug 07, 2016 12:36 pm

try

Code: Select all

init python:
    def auto_voice_function(ident):
        return "voice/" + ident + ".ogg"
    config.auto_voice = auto_voice_function
https://www.renpy.org/doc/html/python.h ... -statement
There is a light at the end of the tunnel, just pray it's not a train.
___
TODO: unresolved/нерешённое

Lightworker
Regular
Posts: 100
Joined: Sun Dec 13, 2015 2:06 pm
Projects: Detroit.exe
Skype: badthai
Contact:

Re: Trying Automatic Voice

#3 Post by Lightworker » Sun Aug 07, 2016 11:12 pm

So It did not work. Someone please help me!

Code: Select all

  config.has_voice = True
    def auto_voice_function(ident):
        return "voice/" + ident + ".ogg"
    config.auto_voice = auto_voice_function
    

Lightworker
Regular
Posts: 100
Joined: Sun Dec 13, 2015 2:06 pm
Projects: Detroit.exe
Skype: badthai
Contact:

Re: Trying Automatic Voice

#4 Post by Lightworker » Tue Aug 09, 2016 3:34 pm

Is it me or Ren'py to blame here.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1441
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: xavimat
Location: Italy
Contact:

Re: Trying Automatic Voice

#5 Post by xavimat » Wed Aug 10, 2016 5:56 am

The file is in the GAME directory? You have defined it to be in the game/voice directory.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Cops&Robbers A two-player experiment
Fear&Love Why can’t we simply express our feelings? Why am I afraid to say ‘I love you’?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Lightworker
Regular
Posts: 100
Joined: Sun Dec 13, 2015 2:06 pm
Projects: Detroit.exe
Skype: badthai
Contact:

Re: Trying Automatic Voice

#6 Post by Lightworker » Wed Aug 10, 2016 12:44 pm

Nevermind, I figured it out.

Post Reply

Who is online

Users browsing this forum: Google [Bot]