Showing
4 changed files
with
29 additions
and
2 deletions
talktalkspeak-test.apk
0 → 100644
No preview for this file type
... | @@ -34,6 +34,9 @@ import java.util.Set; | ... | @@ -34,6 +34,9 @@ import java.util.Set; |
34 | import java.util.regex.Matcher; | 34 | import java.util.regex.Matcher; |
35 | import java.util.regex.Pattern; | 35 | import java.util.regex.Pattern; |
36 | import android.telephony.SmsManager; | 36 | import android.telephony.SmsManager; |
37 | + | ||
38 | +import org.w3c.dom.Text; | ||
39 | + | ||
37 | import java.util.Date; | 40 | import java.util.Date; |
38 | 41 | ||
39 | public class MainActivity extends AppCompatActivity implements TextToSpeech.OnInitListener { | 42 | public class MainActivity extends AppCompatActivity implements TextToSpeech.OnInitListener { |
... | @@ -62,6 +65,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn | ... | @@ -62,6 +65,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn |
62 | private Button button3; | 65 | private Button button3; |
63 | private Button button4; | 66 | private Button button4; |
64 | private Button button5; | 67 | private Button button5; |
68 | + private Button button6; | ||
65 | 69 | ||
66 | public TextView deviceview; | 70 | public TextView deviceview; |
67 | private TextView editText; | 71 | private TextView editText; |
... | @@ -110,6 +114,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn | ... | @@ -110,6 +114,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn |
110 | this.button3 = (Button) findViewById(R.id.button3); | 114 | this.button3 = (Button) findViewById(R.id.button3); |
111 | this.button4 = (Button) findViewById(R.id.button4); | 115 | this.button4 = (Button) findViewById(R.id.button4); |
112 | this.button5 = (Button) findViewById(R.id.button5); | 116 | this.button5 = (Button) findViewById(R.id.button5); |
117 | + this.button6 = (Button) findViewById(R.id.button6); | ||
113 | this.spinner = (Spinner) findViewById(R.id.spinner); | 118 | this.spinner = (Spinner) findViewById(R.id.spinner); |
114 | spinner.setSelection(2); | 119 | spinner.setSelection(2); |
115 | this.spinner2 = (Spinner) findViewById(R.id.spinner2); | 120 | this.spinner2 = (Spinner) findViewById(R.id.spinner2); |
... | @@ -166,6 +171,13 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn | ... | @@ -166,6 +171,13 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn |
166 | } | 171 | } |
167 | }); | 172 | }); |
168 | 173 | ||
174 | + this.button6.setOnClickListener(new View.OnClickListener() { | ||
175 | + public void onClick(View view) { | ||
176 | + String test = "테스트입니다. 목소리 톤과 속도를 알맞게 조정해 주세요."; | ||
177 | + TextToSpeech(test); | ||
178 | + } | ||
179 | + }); | ||
180 | + | ||
169 | //TTS 속도조정 | 181 | //TTS 속도조정 |
170 | this.spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | 182 | this.spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { |
171 | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { | 183 | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { |
... | @@ -265,6 +277,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn | ... | @@ -265,6 +277,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn |
265 | 277 | ||
266 | 278 | ||
267 | 279 | ||
280 | + | ||
268 | private void initializeKakaoReceiver() { | 281 | private void initializeKakaoReceiver() { |
269 | this.kakaoReceiver = new BroadcastReceiver() { | 282 | this.kakaoReceiver = new BroadcastReceiver() { |
270 | public void onReceive(Context context, Intent intent) { | 283 | public void onReceive(Context context, Intent intent) { | ... | ... |
13.1 KB
... | @@ -50,7 +50,7 @@ | ... | @@ -50,7 +50,7 @@ |
50 | <Button | 50 | <Button |
51 | android:id="@+id/button3" | 51 | android:id="@+id/button3" |
52 | android:layout_width="50dp" | 52 | android:layout_width="50dp" |
53 | - android:layout_height="40dp" | 53 | + android:layout_height="50dp" |
54 | android:layout_gravity="right|center_vertical|center_horizontal|center" | 54 | android:layout_gravity="right|center_vertical|center_horizontal|center" |
55 | android:layout_marginRight="10dp" | 55 | android:layout_marginRight="10dp" |
56 | android:background="@drawable/on" | 56 | android:background="@drawable/on" |
... | @@ -88,7 +88,7 @@ | ... | @@ -88,7 +88,7 @@ |
88 | <Button | 88 | <Button |
89 | android:id="@+id/button5" | 89 | android:id="@+id/button5" |
90 | android:layout_width="50dp" | 90 | android:layout_width="50dp" |
91 | - android:layout_height="40dp" | 91 | + android:layout_height="50dp" |
92 | android:layout_gravity="right|center_vertical|center_horizontal|center" | 92 | android:layout_gravity="right|center_vertical|center_horizontal|center" |
93 | android:layout_marginRight="10dp" | 93 | android:layout_marginRight="10dp" |
94 | android:background="@drawable/on" | 94 | android:background="@drawable/on" |
... | @@ -125,6 +125,20 @@ | ... | @@ -125,6 +125,20 @@ |
125 | <TextView android:textSize="20sp" android:textStyle="bold" android:textColor="@android:color/black" android:gravity="left|center_vertical|center_horizontal|center" android:id="@+id/textView42" android:background="#FFFFFF" android:paddingLeft="10dp" android:layout_width="match_parent" android:layout_height="60dp" android:text="톤 설정"/> | 125 | <TextView android:textSize="20sp" android:textStyle="bold" android:textColor="@android:color/black" android:gravity="left|center_vertical|center_horizontal|center" android:id="@+id/textView42" android:background="#FFFFFF" android:paddingLeft="10dp" android:layout_width="match_parent" android:layout_height="60dp" android:text="톤 설정"/> |
126 | <Spinner android:entries="@array/톤" android:layout_gravity="right|center_vertical|center_horizontal|center" android:id="@+id/spinner3" android:layout_width="200dp" android:layout_height="match_parent"/> | 126 | <Spinner android:entries="@array/톤" android:layout_gravity="right|center_vertical|center_horizontal|center" android:id="@+id/spinner3" android:layout_width="200dp" android:layout_height="match_parent"/> |
127 | </FrameLayout> | 127 | </FrameLayout> |
128 | + <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> | ||
129 | + <TextView android:textSize="20sp" android:textStyle="bold" android:textColor="@android:color/black" android:gravity="left|center_vertical|center_horizontal|center" android:id="@+id/textView43" android:background="#FFFFFF" android:paddingLeft="10dp" android:layout_width="match_parent" android:layout_height="60dp" android:text="음성 테스트"/> | ||
130 | + | ||
131 | + <Button | ||
132 | + android:id="@+id/button6" | ||
133 | + style="@style/Widget.AppCompat.Button.Borderless" | ||
134 | + android:layout_width="50dp" | ||
135 | + android:layout_height="50dp" | ||
136 | + android:layout_gravity="right|center_vertical|center_horizontal|center" | ||
137 | + android:layout_marginRight="80dp" | ||
138 | + android:background="@drawable/play" | ||
139 | + app:layout_constraintHorizontal_bias="0.95" | ||
140 | + app:layout_constraintVertical_bias="0.289" /> | ||
141 | + </FrameLayout> | ||
128 | 142 | ||
129 | <TextView | 143 | <TextView |
130 | android:id="@+id/textView5" | 144 | android:id="@+id/textView5" | ... | ... |
-
Please register or login to post a comment