renpy/doc/voice.html

438 lines
27 KiB
HTML
Raw Normal View History

2023-01-18 22:13:55 +00:00
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Voice &#8212; Ren&#39;Py Documentation</title>
<link rel="stylesheet" href="_static/renpydoc.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-sphinx.css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Text" href="text.html" />
<link rel="prev" title="Movie" href="movie.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
</head><body>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
Ren&#39;Py Documentation</a>
<span class="navbar-text navbar-version pull-left"><b>7.5.3</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li><a href="https://www.renpy.org">Home Page</a></li>
<li><a href="https://www.renpy.org/doc/html/">Online Documentation</a></li>
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="index.html">Site <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"><ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="gui.html">GUI Customization Guide</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="language_basics.html">Language Basics</a></li>
<li class="toctree-l1"><a class="reference internal" href="label.html">Labels &amp; Control Flow</a></li>
<li class="toctree-l1"><a class="reference internal" href="dialogue.html">Dialogue and Narration</a></li>
<li class="toctree-l1"><a class="reference internal" href="displaying_images.html">Displaying Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="menus.html">In-Game Menus</a></li>
<li class="toctree-l1"><a class="reference internal" href="python.html">Python Statements</a></li>
<li class="toctree-l1"><a class="reference internal" href="conditional.html">Conditional Statements</a></li>
<li class="toctree-l1"><a class="reference internal" href="audio.html">Audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="movie.html">Movie</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Voice</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="text.html">Text</a></li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l1"><a class="reference internal" href="displayables.html">Displayables</a></li>
<li class="toctree-l1"><a class="reference internal" href="transforms.html">Transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="transitions.html">Transitions</a></li>
<li class="toctree-l1"><a class="reference internal" href="atl.html">Animation and Transformation Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="matrixcolor.html">Matrixcolor</a></li>
<li class="toctree-l1"><a class="reference internal" href="layeredimage.html">Layered Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="3dstage.html">3D Stage</a></li>
<li class="toctree-l1"><a class="reference internal" href="live2d.html">Live2D Cubism</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="style.html">Styles</a></li>
<li class="toctree-l1"><a class="reference internal" href="style_properties.html">Style Properties</a></li>
<li class="toctree-l1"><a class="reference internal" href="screens.html">Screens and Screen Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="screen_actions.html">Screen Actions, Values, and Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="screen_special.html">Special Screen Names</a></li>
<li class="toctree-l1"><a class="reference internal" href="screen_optimization.html">Screen Language Optimization</a></li>
<li class="toctree-l1"><a class="reference internal" href="config.html">Configuration Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="preferences.html">Preference Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="store_variables.html">Store Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="mouse.html">Custom Mouse Cursors</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="launcher.html">Launcher</a></li>
<li class="toctree-l1"><a class="reference internal" href="developer_tools.html">Developer Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="director.html">Interactive Director</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="nvl_mode.html">NVL-Mode Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="input.html">Text Input</a></li>
<li class="toctree-l1"><a class="reference internal" href="side_image.html">Side Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="rooms.html">Image Gallery, Music Room, and Replay Actions</a></li>
<li class="toctree-l1"><a class="reference internal" href="drag_drop.html">Drag and Drop</a></li>
<li class="toctree-l1"><a class="reference internal" href="sprites.html">Sprites</a></li>
<li class="toctree-l1"><a class="reference internal" href="keymap.html">Customizing the Keymap</a></li>
<li class="toctree-l1"><a class="reference internal" href="achievement.html">Achievements</a></li>
<li class="toctree-l1"><a class="reference internal" href="history.html">Dialogue History</a></li>
<li class="toctree-l1"><a class="reference internal" href="multiple.html">Multiple Character Dialogue</a></li>
<li class="toctree-l1"><a class="reference internal" href="splashscreen_presplash.html">Splashscreen and Presplash</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="statement_equivalents.html">Statement Equivalents</a></li>
<li class="toctree-l1"><a class="reference internal" href="save_load_rollback.html">Saving, Loading, and Rollback</a></li>
<li class="toctree-l1"><a class="reference internal" href="persistent.html">Persistent Data</a></li>
<li class="toctree-l1"><a class="reference internal" href="trans_trans_python.html">Transforms and Transitions in Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="gui_advanced.html">Advanced GUI</a></li>
<li class="toctree-l1"><a class="reference internal" href="screen_python.html">Screens and Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="modes.html">Modes</a></li>
<li class="toctree-l1"><a class="reference internal" href="cdd.html">Creator-Defined Displayables</a></li>
<li class="toctree-l1"><a class="reference internal" href="cds.html">Creator-Defined Statements</a></li>
<li class="toctree-l1"><a class="reference internal" href="custom_text_tags.html">Custom Text Tags</a></li>
<li class="toctree-l1"><a class="reference internal" href="character_callbacks.html">Character Callbacks</a></li>
<li class="toctree-l1"><a class="reference internal" href="file_python.html">File Access</a></li>
<li class="toctree-l1"><a class="reference internal" href="color_class.html">Color Class</a></li>
<li class="toctree-l1"><a class="reference internal" href="matrix.html">Matrix</a></li>
<li class="toctree-l1"><a class="reference internal" href="model.html">Model-Based Rendering</a></li>
<li class="toctree-l1"><a class="reference internal" href="other.html">Other Functions and Variables</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building Distributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="updater.html">Web Updater</a></li>
<li class="toctree-l1"><a class="reference internal" href="android.html">Android</a></li>
<li class="toctree-l1"><a class="reference internal" href="chromeos.html">Chrome OS/Chromebook</a></li>
<li class="toctree-l1"><a class="reference internal" href="ios.html">iOS</a></li>
<li class="toctree-l1"><a class="reference internal" href="iap.html">In-App Purchasing</a></li>
<li class="toctree-l1"><a class="reference internal" href="gesture.html">Gestures</a></li>
<li class="toctree-l1"><a class="reference internal" href="raspi.html">Raspberry Pi</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="security.html">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="problems.html">Dealing with Problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="environment_variables.html">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="self_voicing.html">Self-Voicing</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="editor.html">Text Editor Integration</a></li>
<li class="toctree-l1"><a class="reference internal" href="skins.html">Skins</a></li>
<li class="toctree-l1"><a class="reference internal" href="translating_renpy.html">Translating Ren'Py</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog (Ren'Py 7.x-)</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog6.html">Changelog (Ren'Py 6.11 - 6.99)</a></li>
<li class="toctree-l1"><a class="reference internal" href="incompatible.html">Incompatible Changes</a></li>
<li class="toctree-l1"><a class="reference internal" href="distributor.html">Distributor Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
<li class="toctree-l1"><a class="reference internal" href="sponsors.html">Ren'Py Development Sponsors</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="thequestion.html">Script of The Question</a></li>
<li class="toctree-l1"><a class="reference internal" href="thequestion_nvl.html">NVL-mode script for The Question</a></li>
</ul>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3">
<div id="sidebar" class="bs-sidenav" role="complementary"><ul>
<li><a class="reference internal" href="#">Voice</a><ul>
<li><a class="reference internal" href="#voice-tags">Voice Tags</a></li>
<li><a class="reference internal" href="#automatic-voice">Automatic Voice</a></li>
<li><a class="reference internal" href="#voice-functions">Voice Functions</a></li>
<li><a class="reference internal" href="#voice-actions">Voice Actions</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="col-md-9 content">
<div class="section" id="voice">
<h1>Voice<a class="headerlink" href="#voice" title="Permalink to this headline"> link</a></h1>
<p>Ren'Py includes support for playing back voice in conjunction with
dialogue. This is done through the <code class="docutils literal notranslate"><span class="pre">voice</span></code> statement, which gives the
voice filename to play:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">voice</span> <span class="s2">&quot;line0001.ogg&quot;</span>
<span class="s2">&quot;Welcome to Ren&#39;Py&quot;</span>
</pre></div>
</div>
<p>Normally, a playing voice is stopped at the start of the next
interaction. The <code class="docutils literal notranslate"><span class="pre">voice</span> <span class="pre">sustain</span></code> statement can sustain voice playback
through an interaction.</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">voice</span> <span class="s2">&quot;line0001.ogg&quot;</span>
<span class="s2">&quot;Welcome to Ren&#39;Py...&quot;</span>
<span class="k">voice</span> <span class="k">sustain</span>
<span class="s2">&quot;... your digital storytelling engine.&quot;</span>
</pre></div>
</div>
<p>The <a class="reference internal" href="config.html#var-config.voice_filename_format"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.voice_filename_format</span></code></a> variable allows you to customize
the voice filename, making it possible to omit directories and extensions.</p>
<div class="section" id="voice-tags">
<h2>Voice Tags<a class="headerlink" href="#voice-tags" title="Permalink to this headline"> link</a></h2>
<p>Ren'Py includes a voice tag system that makes it possible to selectively
mute or unmute a character's voice. To take advantage of this system,
supply a <code class="docutils literal notranslate"><span class="pre">voice_tag</span></code> argument to each <a class="reference internal" href="dialogue.html#Character" title="Character"><code class="xref py py-func docutils literal notranslate"><span class="pre">Character()</span></code></a>, and use the
<a class="reference internal" href="#SetVoiceMute" title="SetVoiceMute"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetVoiceMute()</span></code></a> or <a class="reference internal" href="#ToggleVoiceMute" title="ToggleVoiceMute"><code class="xref py py-func docutils literal notranslate"><span class="pre">ToggleVoiceMute()</span></code></a> actions to allow the
player to toggle the voice.</p>
<p>For example:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="k">define</span> <span class="n">e</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="s2">&quot;Eileen&quot;</span><span class="p">,</span> <span class="n">voice_tag</span><span class="o">=</span><span class="s2">&quot;eileen&quot;</span><span class="p">)</span>
<span class="k">define</span> <span class="n">l</span> <span class="o">=</span> <span class="n">Character</span><span class="p">(</span><span class="s2">&quot;Lucy&quot;</span><span class="p">,</span> <span class="n">voice_tag</span><span class="o">=</span><span class="s2">&quot;lucy&quot;</span><span class="p">)</span>
<span class="k">screen</span> <span class="n">voice_toggle</span><span class="p">:</span>
<span class="k">vbox</span><span class="p">:</span>
<span class="k">textbutton</span> <span class="s2">&quot;Mute Eileen&quot;</span> <span class="na">action</span> <span class="n">ToggleVoiceMute</span><span class="p">(</span><span class="s2">&quot;eileen&quot;</span><span class="p">)</span>
<span class="k">textbutton</span> <span class="s2">&quot;Mute Lucy&quot;</span> <span class="na">action</span> <span class="n">ToggleVoiceMute</span><span class="p">(</span><span class="s2">&quot;lucy&quot;</span><span class="p">)</span>
<span class="k">label</span> <span class="n">start</span><span class="p">:</span>
<span class="k">show</span> <span class="k">screen</span> <span class="n">voice_toggle</span>
<span class="k">voice</span> <span class="s2">&quot;e01.ogg&quot;</span>
<span class="n">e</span> <span class="s2">&quot;You can turn a character&#39;s voice on and off.&quot;</span>
<span class="k">voice</span> <span class="s2">&quot;l01.ogg&quot;</span>
<span class="n">l</span> <span class="s2">&quot;Yeah! Now I can finally shut you up!&quot;</span>
<span class="k">voice</span> <span class="s2">&quot;l02.ogg&quot;</span>
<span class="n">l</span> <span class="s2">&quot;Wait... that means they can mute me as well! Really?&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="automatic-voice">
<span id="id1"></span><h2>Automatic Voice<a class="headerlink" href="#automatic-voice" title="Permalink to this headline"> link</a></h2>
<p>Ren'Py includes support for automatically determining the voice file to play,
making it possible to play back voice without having to put voice statements
before each line of dialogue.</p>
<p>This is done by creating voice files that match the identifier for each line
of dialogue. To determine the identifiers to use, first export the dialogue
to a spreadsheet by choosing from the launcher &quot;Extract Dialogue&quot;, &quot;Tab-delimited
Spreadsheet (dialogue.tab)&quot;, and &quot;Continue&quot;. This will produce a file, dialogue.tab,
that can be loaded in a spreadsheet program.</p>
<p>The first column of the spreadsheet is the identifier to use, with other
columns giving more information about the dialogue.</p>
<p>To make Ren'Py automatically play voices, set <a class="reference internal" href="config.html#var-config.auto_voice"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.auto_voice</span></code></a> to
a string containing <code class="docutils literal notranslate"><span class="pre">{id}</span></code>. When dialogue occurs, <code class="docutils literal notranslate"><span class="pre">{id}</span></code> is replaced with
the dialogue identifier, forming a filename. If the filename exists, it is
played.</p>
<p>For example, if we have:</p>
<div class="highlight-renpy notranslate"><div class="highlight"><pre><span></span><span class="n">config</span><span class="o">.</span><span class="n">auto_voice</span> <span class="o">=</span> <span class="s2">&quot;voice/</span><span class="si">{id}</span><span class="s2">.ogg&quot;</span>
</pre></div>
</div>
<p>And the dialogue identifier is <code class="docutils literal notranslate"><span class="pre">demo_minigame_03fc91ef</span></code>, then when
the corresponding line is shown, Ren'Py will look for the file
<code class="docutils literal notranslate"><span class="pre">voice/demo_minigame_03fc91ef.ogg</span></code>. If the file exists, Ren'Py will
play it.</p>
</div>
<div class="section" id="voice-functions">
<h2>Voice Functions<a class="headerlink" href="#voice-functions" title="Permalink to this headline"> link</a></h2>
<dl class="function">
<dt id="_get_voice_info">
<code class="descname">_get_voice_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_get_voice_info" title="Permalink to this definition"> link</a></dt>
<dd><p>Returns information about the voice being played by the current
say statement. This function may only be called while a say statement
is executing.</p>
<p>The object returned has the following fields:</p>
<dl class="attribute">
<dt id="VoiceInfo.filename">
<code class="descclassname">VoiceInfo.</code><code class="descname">filename</code><a class="headerlink" href="#VoiceInfo.filename" title="Permalink to this definition"> link</a></dt>
<dd><p>The filename of the voice to be played, or None if no files
should be played.</p>
</dd></dl>
<dl class="attribute">
<dt id="VoiceInfo.auto_filename">
<code class="descclassname">VoiceInfo.</code><code class="descname">auto_filename</code><a class="headerlink" href="#VoiceInfo.auto_filename" title="Permalink to this definition"> link</a></dt>
<dd><p>The filename that Ren'Py looked in for automatic-voicing
purposes, or None if one could not be found.</p>
</dd></dl>
<dl class="attribute">
<dt id="VoiceInfo.tag">
<code class="descclassname">VoiceInfo.</code><code class="descname">tag</code><a class="headerlink" href="#VoiceInfo.tag" title="Permalink to this definition"> link</a></dt>
<dd><p>The voice_tag parameter supplied to the speaking Character.</p>
</dd></dl>
<dl class="attribute">
<dt id="VoiceInfo.sustain">
<code class="descclassname">VoiceInfo.</code><code class="descname">sustain</code><a class="headerlink" href="#VoiceInfo.sustain" title="Permalink to this definition"> link</a></dt>
<dd><p>False if the file was played as part of this interaction. True if
it was sustained from a previous interaction.</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt>
<code class="descname">voice</code><span class="sig-paren">(</span><em>filename</em>, <em>tag=None</em><span class="sig-paren">)</span></dt>
<dd><p>Plays <cite>filename</cite> on the voice channel. The equivalent of the voice
statement.</p>
<dl class="docutils">
<dt><cite>filename</cite></dt>
<dd>The filename to play. This is used with
<a class="reference internal" href="config.html#var-config.voice_filename_format"><code class="xref std std-var docutils literal notranslate"><span class="pre">config.voice_filename_format</span></code></a> to produce the
filename that will be played.</dd>
<dt><cite>tag</cite></dt>
<dd><p class="first">If this is not None, it should be a string giving a
voice tag to be played. If None, this takes its
default value from the voice_tag of the Character
that causes the next interaction.</p>
<p class="last">The voice tag is used to specify which character is
speaking, to allow a user to mute or unmute the
voices of particular characters.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="voice_can_replay">
<code class="descname">voice_can_replay</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voice_can_replay" title="Permalink to this definition"> link</a></dt>
<dd><p>Returns true if it's possible to replay the current voice.</p>
</dd></dl>
<dl class="function">
<dt id="voice_replay">
<code class="descname">voice_replay</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voice_replay" title="Permalink to this definition"> link</a></dt>
<dd><p>Replays the current voice, if possible.</p>
</dd></dl>
<dl class="function">
<dt id="voice_sustain">
<code class="descname">voice_sustain</code><span class="sig-paren">(</span><em>ignored=u''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#voice_sustain" title="Permalink to this definition"> link</a></dt>
<dd><p>The equivalent of the voice sustain statement.</p>
</dd></dl>
</div>
<div class="section" id="voice-actions">
<h2>Voice Actions<a class="headerlink" href="#voice-actions" title="Permalink to this headline"> link</a></h2>
<dl class="function">
<dt id="PlayCharacterVoice">
<code class="descname">PlayCharacterVoice</code><span class="sig-paren">(</span><em>voice_tag</em>, <em>sample</em>, <em>selected=False</em><span class="sig-paren">)</span><a class="headerlink" href="#PlayCharacterVoice" title="Permalink to this definition"> link</a></dt>
<dd><p>This plays <cite>sample</cite> on the voice channel, as if said by a
character with <cite>voice_tag</cite>.</p>
<dl class="docutils">
<dt><cite>sample</cite></dt>
<dd>The full path to a sound file. No voice-related handling
of this file is done.</dd>
<dt><cite>selected</cite></dt>
<dd>If True, buttons using this action will be marked as selected
while the sample is playing.</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="SetCharacterVolume">
<code class="descname">SetCharacterVolume</code><span class="sig-paren">(</span><em>voice_tag</em>, <em>volume=None</em><span class="sig-paren">)</span><a class="headerlink" href="#SetCharacterVolume" title="Permalink to this definition"> link</a></dt>
<dd><p>This allows the volume of each characters to be adjusted.
If <cite>volume</cite> is None, this returns a BarValue that
controls the value of <cite>voice_tag</cite>. Otherwise, this set it to <cite>volume</cite>.</p>
<p><cite>volume</cite> is a number between 0.0 and 1.0, and is interpreted as a
fraction of the mixer volume for <cite>voice</cite> channel.</p>
</dd></dl>
<dl class="function">
<dt id="SetVoiceMute">
<code class="descname">SetVoiceMute</code><span class="sig-paren">(</span><em>voice_tag</em>, <em>mute</em><span class="sig-paren">)</span><a class="headerlink" href="#SetVoiceMute" title="Permalink to this definition"> link</a></dt>
<dd><p>If <cite>mute</cite> is true, mutes voices that are played with the given
<cite>voice_tag</cite>. If <cite>mute</cite> is false, unmutes voices that are played
with <cite>voice_tag</cite>.</p>
</dd></dl>
<dl class="function">
<dt id="ToggleVoiceMute">
<code class="descname">ToggleVoiceMute</code><span class="sig-paren">(</span><em>voice_tag</em>, <em>invert=False</em><span class="sig-paren">)</span><a class="headerlink" href="#ToggleVoiceMute" title="Permalink to this definition"> link</a></dt>
<dd><p>Toggles the muting of <cite>voice_tag</cite>. This is selected if
the given voice tag is muted, unless <cite>invert</cite> is true,
in which case it's selected if the voice is unmuted.</p>
</dd></dl>
<dl class="function">
<dt id="VoiceReplay">
<code class="descname">VoiceReplay</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#VoiceReplay" title="Permalink to this definition"> link</a></dt>
<dd><p>Replays the most recently played voice.</p>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
</p>
<p>
&copy; Copyright 2012-2022, Tom Rothamel.<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.6.<br/>
</p>
</div>
</footer>
</body>
</html>