设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 55|回复: 0

[转载发布] SpokenWord: A Text-To-Speech Plugin

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29925
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38778

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    SpokenWord: A Text-To-Speech Plugin v1.0
    by dismal_science__

    Features
    SpokenWord is a plugin for RPG Maker MV that allows you to easily include text-to-speech in your projects using plugin commands, script, and/or message control characters.

    Screenshots







    https://www.youtube.com/embed/eDBGaxkLrFM

    How To Use
    Once the plugin has been successfully added to your project, the easiest way to use SpokenWord text-to-speech in your game is by using control characters in a Show Text event command.

    To do this, create a new event or edit an existing event:





    The Edit command should bring up that event's Editor window:





    In the contents section, right-click and select New:





    Now, in the Event Commands window, click on the 1 tab and choose Show Text under the Message section:





    This will bring up the Show Text window, where you can specify what text should appear in the message window when your player character interacts with this event.





    RPG Maker MV uses control characters as a way to "display values of variables and names of actors by entering [them] into the text":





    SpokenWord adds three additional control characters, which can be used in addition to the ones listed above:





    So, let's try it out- in the Text section of the window type in the following:

                    Code:       
    1. \SW[Hello], can you hear me?
    复制代码


    Now click OK to return to the Event Editor, and make sure Priority is set to "Same as characters" and Trigger is set to "Action Button" before hitting OK again and returning to the Map Editor.





    Now we're ready to go!  Click on the Playtest button and test it out:






    That is the simplest way to implement SpokenWord in your project.  For more flexibility, the plugin also offers more advanced commands.



    ADVANCED COMMANDS
    In the most basic example, we only used the \SW[x] control character.  But what about the other two?

    \SWE['x'] allows you to evaluate (execute JavaScript) x as code and display the result.  So if your text was:

                    Code:       
    1. \SW[Hello], \SWE['$gameActors.actor(1)._name'] can you hear me?
    复制代码


    The message box should display something like:





    And you should hear "Hello" and "Harold".

    * Please note that the code / expression you wish to evaluate must be wrapped in 'single quotes' for it to work.

    Similarly, \SWV[x] lets you display and utter the value of the xth variable.  In this example $gameVariable 5 is equal to 3, so:

                    Code:       
    1. \SW[Hello], \SWE['$gameActors.actor(1)._name'] can you hear me?
    2. \C[1]You owe me \SWV[5] cookies!
    复制代码


    Should display:





    And you should hear "Hello", "Harold" and "3".

    Beyond control characters, SpokenWord can also be invoked using plugin commands.

                    Code:       
    1. spokenWord word
    2. spokenWord #VariableID
    3. spokenWord e:JavaScriptCode
    复制代码


    Similar to control characters this will utter either a specified word, variable ID or expression.

    Examples include-

                    Code:       
    1. spokenWord dope
    复制代码


    You should hear "dope".

                    Code:       
    1. spokenWord #5
    复制代码


    If $gameVariable 5's value is 3, you should hear "3".

                    Code:       
    1. spokenWord e:$gameActors.actor(1)._name
    复制代码


    You should hear "Harold".

    The second plugin command is setVoice-

                    Code:       
    1. setVoice vValue pValue rValue
    复制代码


    This changes the settings (see plugin parameters in the Setup section) of volume (v), pitch (p), and speech rate (r).

    So-

                    Code:       
    1. setVoice p2 r3
    复制代码


    Would set the pitch to 2 and speech rate to 3.

                    Code:       
    1. setVoice v0.5 p0.7
    复制代码


    Would set volume to 0.5 and pitch to 0.7.

    Finally, SpokenWord has two script commands-

                    Code:       
    1. dismal.SpokenWord.utter("word")
    复制代码


    Again, like the \SW[x]control character and the spokenWord plugin command, this will utter the specified word.

    And lastly,

                    Code:       
    1. dismal.SpokenWord.setVoice(volume, pitch, rate)
    复制代码


    This script function is similar to the setVoice plugin command.


    Script
    Download here (itch.io)

    Terms of Use
    This plugin is released under a modified X11 license.

    Copyright ©MMXX dismal_science__.  All Rights Reserved.
    Permission to use and distribute for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both copyright notice and this permission notice appear in supporting documentation.

    Additional Terms of Use

    • "dismal_science" must be given credit in your games.
    • Do NOT change the code, filename, parameters, and information of the plugin.
    • Do NOT take code for your own released plugins.
    The above copyright notice, additional terms of use, and this permission notice shall be included in all copies or substantial portions of the plugin.

    THE PLUGIN IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PLUGIN OR THE USE OR OTHER DEALINGS IN THE PLUGIN.



    CHANGELOG
    2020.05.29 Initial Release.

    Enjoy!


    本贴来自国际rpgmaker官方论坛作者:aporokizzu处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/spokenword-a-text-to-speech-plugin.122233/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 07:33 , Processed in 0.065148 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表