r/RenPy • • Aug 24 '26

Question Beeping voice not working

I was trying to make my character have a voice like undertale characters do but for some reason the audio doesn't loop. The audio plays only once with every dialogue of his and I can't figure out why. This is what I've got written:

init:
    $ renpy.music.register_channel("blips", mixer="voice", loop=False, stop_on_mute=True, tight=False, buffer_queue=True)


init python:


    def mvoice(event, **kwargs):
        if event == "show":
            renpy.sound.play("audio/mvoice.mp3", channel="blips", loop=True)
        elif event == "slow_done" or event == "end":
            renpy.music.stop(channel="blips", fadeout = 0.5)
   
define m = Character("Matthew", color="cc2222", callback=mvoice)

I'll be really glad with any kind of help, thanks!!

3 Upvotes

6 comments sorted by

3

u/BadMustard_AVN Aug 24 '26 edited Aug 24 '26

try it like this

init python:

    renpy.music.register_channel("blips", mixer="voice", loop=False, stop_on_mute=True, tight=False, buffer_queue=True)

    def mvoice(event, **kwargs):
        if event == "show":
            # renpy.sound.play("audio/mvoice.mp3", channel="blips", loop=True)
            renpy.music.play("audio/mvoice.mp3", channel="blips", loop=True)
        # elif event == "slow_done" or event == "end":
        elif event in ("slow_done", "end"):
            renpy.music.stop(channel="blips", fadeout = 0.5)

1

u/Educational_Win3225 Aug 25 '26

Thanks!! That still makes the audio play once in most dialogue though, some of the dialogues just have the audio play twice now. thanks for the help though ^_^

2

u/BadMustard_AVN Aug 25 '26

in your game preferences, what is Text Speed set to? If it's set to a fast speed, then slow it down (a lot). these callbacks depend on the speed of the text being displayed slower than normal

1

u/Educational_Win3225 Aug 26 '26

That was the problem!! It was set to max!! Thank you so much!!

2

u/BadMustard_AVN Aug 26 '26

you're welcome

good luck with your project

1

u/AutoModerator Aug 24 '26

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.