forked from kbinani/libvsq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVoiceLanguageEnum.hpp
More file actions
93 lines (86 loc) · 2.33 KB
/
VoiceLanguageEnum.hpp
File metadata and controls
93 lines (86 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/**
* MeasureLine.h
* Copyright © 2012 kbinani
*
* This file is part of libvsq.
*
* libvsq is free software; you can redistribute it and/or
* modify it under the terms of the BSD License.
*
* libvsq is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef __VoiceLanguageEnum_h__
#define __VoiceLanguageEnum_h__
#include <string>
#include <algorithm>
#include <cctype>
#include "vsqglobal.hpp"
#include "StringUtil.hpp"
VSQ_BEGIN_NAMESPACE
/**
* 歌手の歌唱言語を表す列挙子
* @class table
* @name VoiceLanguageEnum
*/
class VoiceLanguage
{
public:
enum VoiceLanguageEnum
{
/**
* 日本語
* @var int
*/
JAPANESE = 0,
/**
* 英語
* @var int
*/
ENGLISH = 1
};
/**
* 歌手の名前から、その歌手の歌唱言語を取得する
* @param name (string) 歌手の名前
* @return (VoiceLanguageEnum) 歌唱言語
* @access static
*/
static VoiceLanguageEnum valueFromSingerName( const std::string &name )
{
std::string search = StringUtil::toLower( name );
if( search == "meiko" ||
search == "kaito" ||
search == "miku" ||
search == "rin" ||
search == "len" ||
search == "rin_act2" ||
search == "len_act2" ||
search == "gackpoid" ||
search == "luka_jpn" ||
search == "megpoid" ||
search == "sfa2_miki" ||
search == "yuki" ||
search == "kiyoteru" ||
search == "miku_sweet" ||
search == "miku_dark" ||
search == "miku_soft" ||
search == "miku_light" ||
search == "miku_vivid" ||
search == "miku_solid" ){
return VoiceLanguage::JAPANESE;
}else if( search == "sweet_ann" ||
search == "prima" ||
search == "luka_eng" ||
search == "sonika" ||
search == "lola" ||
search == "leon" ||
search == "miriam" ||
search == "big_al" ){
return VoiceLanguage::ENGLISH;
}
return VoiceLanguage::JAPANESE;
}
};
VSQ_END_NAMESPACE
#endif