Code Monkey home page Code Monkey logo

renpy-lipsync-plugin's Introduction

Wendy Nam (Seo-A-Nam)

Game Portfolio | Old GitHub | Status Updates

✨ Open to Commissioning Work ✨

Skills & Interest

Python Badge Ren'Py Badge

Go Badge C Badge C++ Badge Shell Badge PHP Badge

HTML5 Badge JavaScript Badge

Crafting Dev Tools

Open-source Contribution

Application Service development

renpy-lipsync-plugin's People

Contributors

wendy-nam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

renpy-lipsync-plugin's Issues

Backslash in filename, use '/' instead

[code]
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 35, in script
$ lipsync(lisa, "what-can-i-do-for-you-npc-british-male-99751.wav", "What can I do for you?")
File "game/script.rpy", line 35, in
$ lipsync(lisa, "what-can-i-do-for-you-npc-british-male-99751.wav", "What can I do for you?")
File "game/lip-sync-plugin/lipsync_module.rpy", line 31, in lipsync
load_lipsync_data(character_name, audio_track) # Load lipsync data based on the audio track
File "game/lip-sync-plugin/lipsync_module.rpy", line 21, in load_lipsync_data
lipsync_text = renpy.file(file_path).read().decode("utf-8")
Exception: Backslash in filename, use '/' instead: 'lip-sync-plugin/lip-sync-data/lisa\what-can-i-do-for-you-npc-british-male-99751.txt'

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "game/script.rpy", line 35, in script
$ lipsync(lisa, "what-can-i-do-for-you-npc-british-male-99751.wav", "What can I do for you?")
File "D:\RenPy\renpy-8.0.3-sdk\renpy\ast.py", line 1138, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "D:\RenPy\renpy-8.0.3-sdk\renpy\python.py", line 1122, in py_exec_bytecode
exec(bytecode, globals, locals)
File "game/script.rpy", line 35, in
$ lipsync(lisa, "what-can-i-do-for-you-npc-british-male-99751.wav", "What can I do for you?")
File "game/lip-sync-plugin/lipsync_module.rpy", line 31, in lipsync
load_lipsync_data(character_name, audio_track) # Load lipsync data based on the audio track
File "game/lip-sync-plugin/lipsync_module.rpy", line 21, in load_lipsync_data
lipsync_text = renpy.file(file_path).read().decode("utf-8")
File "D:\RenPy\renpy-8.0.3-sdk\renpy\exports.py", line 2608, in file
return open_file(fn, encoding=encoding)
File "D:\RenPy\renpy-8.0.3-sdk\renpy\exports.py", line 2590, in open_file
rv = renpy.loader.load(fn, directory=directory)
File "D:\RenPy\renpy-8.0.3-sdk\renpy\loader.py", line 824, in load
raise Exception("Backslash in filename, use '/' instead: %r" % name)
Exception: Backslash in filename, use '/' instead: 'lip-sync-plugin/lip-sync-data/lisa\what-can-i-do-for-you-npc-british-male-99751.txt'

Windows-10-10.0.19045 AMD64
Ren'Py 8.1.2.23090503
LipSyncPlugin 1.0
Wed Sep 13 16:24:11 2023
[/code]

Dialogue history repeat issue

since this tool renders the text multiple times to make the motions seem run asynchronously with dialogue, I found the issue of it printing history multiple times. I will correct the code in an hour to fix the issue.
It can be simply done by setting the flag of storing history false while rendering the text additionally multiple times, and then returning it back to True.

Some Suggestions

I have already said that the text renderer should be out, but I have something more.

The voices here probably run through the sfx Channel, but they should do it through the Voice Channel.

There should also be a mode for anime sprites that only have 3 different mouth positions. Is a bit difficult to adjust these to the 8 positions or how many that is.

If it's possible, maybe even livecomposite support because I actually use that instead of layeredimages as I didn't warm up to it, but I think it wouldn't be a problem if I switched to layered.

Sequential Lipsync Termination on Key Press

In the current implementation of the code, there is an issue where the sequential execution of the lipsync function gets prematurely terminated when specific keys (Return/Enter or Space) are held down. This behavior occurs because the key release detection is not well implemented.

Details:
The lipsync function is responsible for animating lip sync by displaying mouth shapes at appropriate times along with dialogue. To control the playback of this animation, the code checks for specific key presses (Return/Enter or Space), mouse clicks, and touch interactions. The goal is to pause or stop the animation when user input or interactions are detected.

However, when the user holds down the Return/Enter or Space key, the code incorrectly interprets this as a continuous key press. As a result, the lipsync function prematurely exits, causing the animation to end abruptly. This is not the intended behavior, as the animation should only stop when the key is released.

Possible Solution:
To address this issue, the code logic for detecting key presses and releases should be modified to ensure that the lipsync function continues its sequential execution until the key is actually released. This can be achieved by properly tracking key states (pressed or released) and making decisions based on those states. When a key is held down, the code should not trigger the termination of the lipsync function until the key is released.

Exclude image in charactername

[code]
I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/00start.rpy", line 237, in script call
call _splashscreen from _call_splashscreen_1
File "game/story/ch0.rpy", line 29, in script
$ lipsync(but, "01.ogg", "“What the heck is this?”")
File "game/story/ch0.rpy", line 29, in
$ lipsync(but, "01.ogg", "“What the heck is this?”")
File "game/lip-sync-plugin/lipsync_module.rpy", line 30, in lipsync
load_lipsync_data(character_name, audio_track) # Load lipsync data based on the audio track
File "game/lip-sync-plugin/lipsync_module.rpy", line 20, in load_lipsync_data
lipsync_text = renpy.file(file_path).read().decode("utf-8")
OSError: Couldn't find file 'lip-sync-plugin/lip-sync-data/BATTLER USHIROMIYA {image=gui/wing.png}/01.txt'.

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "renpy/common/00start.rpy", line 237, in script call
call _splashscreen from _call_splashscreen_1
File "game/story/ch0.rpy", line 29, in script
$ lipsync(but, "01.ogg", "“What the heck is this?”")
File "D:\RenPy\renpy-8.0.3-sdk\renpy\ast.py", line 1138, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "D:\RenPy\renpy-8.0.3-sdk\renpy\python.py", line 1122, in py_exec_bytecode
exec(bytecode, globals, locals)
File "game/story/ch0.rpy", line 29, in
$ lipsync(but, "01.ogg", "“What the heck is this?”")
File "game/lip-sync-plugin/lipsync_module.rpy", line 30, in lipsync
load_lipsync_data(character_name, audio_track) # Load lipsync data based on the audio track
File "game/lip-sync-plugin/lipsync_module.rpy", line 20, in load_lipsync_data
lipsync_text = renpy.file(file_path).read().decode("utf-8")
File "D:\RenPy\renpy-8.0.3-sdk\renpy\exports.py", line 2608, in file
return open_file(fn, encoding=encoding)
File "D:\RenPy\renpy-8.0.3-sdk\renpy\exports.py", line 2590, in open_file
rv = renpy.loader.load(fn, directory=directory)
File "D:\RenPy\renpy-8.0.3-sdk\renpy\loader.py", line 833, in load
raise IOError("Couldn't find file '%s'." % name)
OSError: Couldn't find file 'lip-sync-plugin/lip-sync-data/BATTLER USHIROMIYA {image=gui/wing.png}/01.txt'.

Windows-10-10.0.19045 AMD64
Ren'Py 8.1.2.23090503
Umineko: When They Cry - Witch's Promise 1.0
Wed Sep 13 18:12:50 2023
[/code]

Code should exclude/ignore {image=gui/wing.png} because you can't put a / in a folder name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.