voiceview

package
v0.0.0-...-94fff03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: MIT Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package voiceview is the voice and dialogue previewer of wpix-editor, routed by package viewer: a read-only preview with sound of the files of package speech. A voice (*.voice.json) speaks a line typed in the panel and draws the line's notes as a piano roll; a dialogue (*.dialogue.json) plays in a box, line by line, with a Next button. Its kinds are the only ones that run with audio on. Editing voices and dialogues stays in the library's Voice Editor.

Index

Constants

View Source
const (
	IDText    = "voice.text"
	IDSpeed   = "voice.speed"
	IDSay     = "voice.say"
	IDSkip    = "voice.skip"
	IDStop    = "voice.stop"
	IDNext    = "dialogue.next"
	IDRestart = "dialogue.restart"
	IDEnd     = "dialogue.stop"
	IDStatus  = "status"
)

The widget ids of the panel.

View Source
const DefaultLine = "Hello there, traveler! Are you lost? The village is just over the hill."

DefaultLine is the line a voice says when the tool opens.

Variables

This section is empty.

Functions

func New

func New() toolshell.Tool

New returns the tool.

Types

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

Tool is the "voice" tool. It is a toolshell.Tool without a document, an toolshell.Initializer (it installs package speech before the engine's schedule is built) and a toolshell.Closer: the host can switch it to another file.

func (*Tool) Check

func (*Tool) Check(key string) error

Check reports whether the tool can open the file at key. The command calls it before opening a window.

func (*Tool) Close

func (t *Tool) Close(s *toolshell.Shell)

Close implements toolshell.Closer: it ends the line or the dialogue, deletes the entities and releases the file's assets.

func (*Tool) Draw

func (t *Tool) Draw(s *toolshell.Shell, screen ebiten.FinalScreen)

Draw implements toolshell.Tool: the text in the free area and, for a voice, the piano roll of the line under it with a playhead.

func (*Tool) Init

func (t *Tool) Init(s *toolshell.Shell)

Init implements toolshell.Initializer: it installs package speech. Its system does not run while the shell pauses the game, so Sync steps it. A second Init does nothing.

func (*Tool) Open

func (t *Tool) Open(s *toolshell.Shell, key string) error

Open implements toolshell.Tool.

func (*Tool) Panel

func (t *Tool) Panel() toolshell.Panel

Panel implements toolshell.Tool.

func (*Tool) Set

func (t *Tool) Set(id string, v json.RawMessage) error

Set implements toolshell.Tool.

func (*Tool) Sync

func (t *Tool) Sync(s *toolshell.Shell)

Sync implements toolshell.Syncer: it steps speech by one tick (the shell pauses the game, so the speech system does not run) and replays the line or the dialogue when its file was reloaded.

func (*Tool) Update

func (t *Tool) Update(*toolshell.Shell)

Update implements toolshell.Tool. The viewport takes no input: a click in it only starts the sound in a browser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL