julius

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Consonants = map[string]*Consonant{
	"":   {VSQXPhoneme: "", Kana: []string{"あ", "い", "う", "え", "お"}},
	"k":  {VSQXPhoneme: "k", Kana: []string{"か", "き", "く", "け", "こ"}},
	"s":  {VSQXPhoneme: "s", Kana: []string{"さ", "すぃ", "す", "せ", "そ"}},
	"t":  {VSQXPhoneme: "t", Kana: []string{"た", "てぃ", "とぅ", "て", "と"}},
	"n":  {VSQXPhoneme: "n", Kana: []string{"な", "に", "ぬ", "ね", "の"}},
	"h":  {VSQXPhoneme: "h", Kana: []string{"は", "ひ", "ふ", "へ", "ほ"}},
	"f":  {VSQXPhoneme: `p\`, Kana: []string{"ふぁ", "ふぃ", "ふ", "ふぇ", "ふぉ"}},
	"m":  {VSQXPhoneme: "m", Kana: []string{"ま", "み", "む", "め", "も"}},
	"y":  {VSQXPhoneme: "j", Kana: []string{"や", "い", "ゆ", "いぇ", "よ"}},
	"r":  {VSQXPhoneme: "4", Kana: []string{"ら", "り", "る", "れ", "ろ"}},
	"w":  {VSQXPhoneme: "w", Kana: []string{"わ", "うぃ", "う", "うぇ", "うぉ"}},
	"g":  {VSQXPhoneme: "g", Kana: []string{"が", "ぎ", "ぐ", "げ", "ご"}},
	"z":  {VSQXPhoneme: "z", Kana: []string{"ざ", "ずぃ", "ず", "ぜ", "ぞ"}},
	"d":  {VSQXPhoneme: "d", Kana: []string{"だ", "でぃ", "どぅ", "で", "ど"}},
	"b":  {VSQXPhoneme: "b", Kana: []string{"ば", "び", "ぶ", "べ", "ぼ"}},
	"ky": {VSQXPhoneme: "k'", Kana: []string{"きゃ", "き", "きゅ", "きぇ", "きょ"}},
	"sh": {VSQXPhoneme: "S", Kana: []string{"しゃ", "し", "しゅ", "しぇ", "しょ"}},
	"ty": {VSQXPhoneme: "t'", Kana: []string{"てゃ", "てぃ", "てゅ", "て", "てょ"}},
	"ch": {VSQXPhoneme: "tS", Kana: []string{"ちゃ", "ち", "ちゅ", "ちぇ", "ちょ"}},
	"ny": {VSQXPhoneme: "n'", Kana: []string{"にゃ", "に", "にゅ", "にぇ", "にょ"}},
	"hy": {VSQXPhoneme: "C", Kana: []string{"ひゃ", "ひ", "ひゅ", "ひぇ", "ひょ"}},
	"my": {VSQXPhoneme: "m'", Kana: []string{"みゃ", "み", "みゅ", "みぇ", "みょ"}},
	"ry": {VSQXPhoneme: "4'", Kana: []string{"りゃ", "り", "りゅ", "りぇ", "りょ"}},
	"gy": {VSQXPhoneme: "g'", Kana: []string{"ぎゃ", "ぎ", "ぎゅ", "ぎぇ", "ぎょ"}},
	"j":  {VSQXPhoneme: "dZ", Kana: []string{"じゃ", "じ", "じゅ", "じぇ", "じょ"}},
	"dy": {VSQXPhoneme: "d'", Kana: []string{"でゃ", "でぃ", "でゅ", "で", "でょ"}},
	"by": {VSQXPhoneme: "b'", Kana: []string{"びゃ", "び", "びゅ", "びぇ", "びょ"}},
	"p":  {VSQXPhoneme: "p", Kana: []string{"ぱ", "ぴ", "ぷ", "ぺ", "ぽ"}},
	"py": {VSQXPhoneme: "p'", Kana: []string{"ぴゃ", "ぴ", "ぴゅ", "ぴぇ", "ぴょ"}},
	"ts": {VSQXPhoneme: "ts", Kana: []string{"つぁ", "つぃ", "つ", "つぇ", "つぉ"}},
	"zy": {VSQXPhoneme: "z'", Kana: []string{"ずゃ", "ずぃ", "ず", "ずぇ", "ずぉ"}},
}
View Source
var DictationModelNames = []string{
	"dictation",
	"ssr",
	"lsr",
}
View Source
var OnProgress func(float64, float64)
View Source
var SpecialsForVSQX = map[string]string{
	"q":    "",
	"sp":   "",
	"silB": "",
	"silE": "",
	"N":    "ん",
}
View Source
var Vowels = map[string]int{
	"a": 0,
	"i": 1,
	"u": 2,
	"e": 3,
	"o": 4,
}

Functions

This section is empty.

Types

type Consonant added in v0.2.0

type Consonant struct {
	VSQXPhoneme string
	Kana        []string
}

type RecogOut added in v0.4.0

type RecogOut struct {
	XMLName xml.Name `xml:"RECOGOUT"`
	SHypo   *SHypo   `xml:"SHYPO"`
}

type Result

type Result struct {
	Dictation [][]string
	Segments  []Segment
	// contains filtered or unexported fields
}

func Dictate added in v0.2.0

func Dictate(wavfile, model string) (*Result, error)

func Segmentate added in v0.2.0

func Segmentate(wavfile, wordsfile, objPrefix string) (*Result, error)

func (*Result) DictationString added in v0.2.0

func (result *Result) DictationString() string

type SHypo added in v0.4.0

type SHypo struct {
	XMLName xml.Name `xml:"SHYPO"`
	WHypo   []*WHypo `xml:"WHYPO"`
	Rank    int      `xml:"RANK,attr"`
	Score   float64  `xml:"SCORE,attr"`
}

type Segment

type Segment struct {
	BeginFrame int
	EndFrame   int
	BeginTime  float64
	EndTime    float64
	Unit       string
	Score      float64
}

type WHypo added in v0.4.0

type WHypo struct {
	XMLName xml.Name `xml:"WHYPO"`
	Word    string   `xml:"WORD,attr"`
	ClassID string   `xml:"CLASSID,attr"`
	Phone   string   `xml:"PHONE,attr"`
	CM      float64  `xml:"CM,attr"`
}

Jump to

Keyboard shortcuts

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