Skip to content

Commit b00204b

Browse files
olami-developersolami-developers
authored andcommitted
Modify english text
1 parent b59496a commit b00204b

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

examples/src/main/java/ai/olami/android/example/HotwordDetectionActivity.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ private void sleep(int milliseconds) {
272272
}
273273

274274
/**
275-
* Check hardware resource permissions
275+
* Check hardware resource permissions.
276276
*/
277277
private boolean checkDeviceResourcePermissions() {
278278
// Check if the user agrees to access the microphone
@@ -356,10 +356,8 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in
356356
}
357357
}
358358

359-
// ============================= 處理Audiorecord ==============================================
360359
/**
361-
* 初始化Audiorecord物件
362-
*
360+
* Initial AudioRecord
363361
*/
364362
private void createAudioRecord() {
365363
int minBufferSize = AudioRecord.getMinBufferSize(
@@ -398,8 +396,7 @@ private void createAudioRecord() {
398396
}
399397

400398
/**
401-
* 開始錄音
402-
*
399+
* Start audio recording.
403400
*/
404401
private void startRecording() {
405402
if (mAudioRecord == null) {
@@ -412,8 +409,7 @@ private void startRecording() {
412409
}
413410

414411
/**
415-
* 停止錄音並釋放錄音資源
416-
*
412+
* Stop audio recording and release resource.
417413
*/
418414
public void stopAndReleaseAudioRecord() {
419415
if ((mAudioRecord != null) && (mAudioRecord.getState() != AudioRecord.STATE_UNINITIALIZED)) {
@@ -426,5 +422,4 @@ public void stopAndReleaseAudioRecord() {
426422
}
427423
mAudioRecord = null;
428424
}
429-
// ============================= 處理Audiorecord ==============================================
430425
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<resources>
22
<string name="app_name">olami-android-hotword-detect-sdk</string>
3-
<string name="hotwordDetectOnInitializing">Hotword detect is initializing...</string>
4-
<string name="hotwordDetectOnDetect">Hello, please say the keyword [OLAMI].</string>
5-
<string name="hotwordOnInitialized">Hotword detect is initialized.</string>
6-
<string name="hotwordOnHotwordDetect">The keyword [OLAMI] is detected.</string>
7-
<string name="hotwordDetectSwitch">Hotword detect switch</string>
8-
<string name="hotwordDetectIsClose">Hotword detect is close.</string>
3+
<string name="hotwordDetectOnInitializing">Hotword detection is initializing...</string>
4+
<string name="hotwordDetectOnDetect">Hi, just say OLAMI to wake up.</string>
5+
<string name="hotwordOnInitialized">Hotword detection is initialized.</string>
6+
<string name="hotwordOnHotwordDetect">The hotword (OLAMI) has been detected.</string>
7+
<string name="hotwordDetectSwitch">Hotword detection toggle</string>
8+
<string name="hotwordDetectIsClose">Hotword detection disabled.</string>
99
</resources>

0 commit comments

Comments
 (0)