From 34e4e0d2a2e720211335eb77de5c59bb25337e2f Mon Sep 17 00:00:00 2001 From: lvqiang214 Date: Thu, 10 Aug 2023 15:17:54 +0800 Subject: [PATCH] add xts case Signed-off-by: lvqiang214 --- ai/BUILD.gn | 1 + .../AppScope/app.json | 21 + .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 6790 bytes ai/intelligent_voice_framework/BUILD.gn | 42 ++ ai/intelligent_voice_framework/Test.json | 39 ++ .../signature/openharmony_sx.p7b | Bin 0 -> 3515 bytes .../src/main/ets/TestAbility/TestAbility.ets | 50 ++ .../src/main/ets/TestAbility/pages/Index.ets | 34 ++ .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 ++ .../EnrollIntelligentVoiceEngine.test.ets | 526 ++++++++++++++++++ .../IntelligentVoiceManagerApi10.test.ets | 142 +++++ .../src/main/ets/test/List.test.ets | 9 + .../WakeupIntelligentVoiceEngine.test.ets | 305 ++++++++++ .../src/main/module.json | 37 ++ .../main/resources/base/element/color.json | 8 + .../main/resources/base/element/string.json | 24 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../resources/base/profile/test_pages.json | 5 + 19 files changed, 1300 insertions(+) create mode 100755 ai/intelligent_voice_framework/AppScope/app.json create mode 100755 ai/intelligent_voice_framework/AppScope/resources/base/element/string.json create mode 100755 ai/intelligent_voice_framework/AppScope/resources/base/media/app_icon.png create mode 100755 ai/intelligent_voice_framework/BUILD.gn create mode 100755 ai/intelligent_voice_framework/Test.json create mode 100755 ai/intelligent_voice_framework/signature/openharmony_sx.p7b create mode 100755 ai/intelligent_voice_framework/src/main/ets/TestAbility/TestAbility.ets create mode 100755 ai/intelligent_voice_framework/src/main/ets/TestAbility/pages/Index.ets create mode 100755 ai/intelligent_voice_framework/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts create mode 100755 ai/intelligent_voice_framework/src/main/ets/test/EnrollIntelligentVoiceEngine.test.ets create mode 100755 ai/intelligent_voice_framework/src/main/ets/test/IntelligentVoiceManagerApi10.test.ets create mode 100755 ai/intelligent_voice_framework/src/main/ets/test/List.test.ets create mode 100755 ai/intelligent_voice_framework/src/main/ets/test/WakeupIntelligentVoiceEngine.test.ets create mode 100755 ai/intelligent_voice_framework/src/main/module.json create mode 100755 ai/intelligent_voice_framework/src/main/resources/base/element/color.json create mode 100755 ai/intelligent_voice_framework/src/main/resources/base/element/string.json create mode 100755 ai/intelligent_voice_framework/src/main/resources/base/media/icon.png create mode 100755 ai/intelligent_voice_framework/src/main/resources/base/profile/test_pages.json diff --git a/ai/BUILD.gn b/ai/BUILD.gn index 2d5f62cb7..d6315af33 100755 --- a/ai/BUILD.gn +++ b/ai/BUILD.gn @@ -21,6 +21,7 @@ group("ai") { deps += [ "mindspore/mindsporectest:ActsMindSporeTest", "mindspore/mindsporejstest:ActsMindsporeJSTest", + "intelligent_voice_framework:intelligentvoice_js_hap", ] } } diff --git a/ai/intelligent_voice_framework/AppScope/app.json b/ai/intelligent_voice_framework/AppScope/app.json new file mode 100755 index 000000000..9ba8c02ae --- /dev/null +++ b/ai/intelligent_voice_framework/AppScope/app.json @@ -0,0 +1,21 @@ +{ + "app":{ + "bundleName":"ohos.acts.ai.intelligentvoice", + "vendor":"huawei", + "versionCode":1000000, + "versionName":"1.0.0", + "debug":false, + "icon":"$media:icon", + "label":"$string:app_name", + "description":"$string:description_application", + "distributedNotificationEnabled":true, + "keepAlive":true, + "singleUser":true, + "minAPIVersion":10, + "targetAPIVersion":10, + "car":{ + "apiCompatibleVersion":10, + "singleUser":false + } + } +} diff --git a/ai/intelligent_voice_framework/AppScope/resources/base/element/string.json b/ai/intelligent_voice_framework/AppScope/resources/base/element/string.json new file mode 100755 index 000000000..0d3507c0d --- /dev/null +++ b/ai/intelligent_voice_framework/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "ohosProject" + } + ] +} diff --git a/ai/intelligent_voice_framework/AppScope/resources/base/media/app_icon.png b/ai/intelligent_voice_framework/AppScope/resources/base/media/app_icon.png new file mode 100755 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOqSxyuN1x;Is@8~m?*>}** znrRFArP!K_52RpX*&JHMR<^lVdm8ypJ}0R(SD(51j;6@ni$6bQ+2XL+R^|NnSp5}(kzvMZ^(@4fD_{QVu$(&K6H|C37TG1Am9Re{<<3gd zh@`>;BqkXMW&p0T6rt|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XJePLPp)K$OhSY`$1^%qyo=(SHcBGPqUoqk}uIy=7mZglCDzm7P-^GDC~=R`k$ zMqJXY9*hM9f8^H91T*@!F85JeXJ;7p0TMwfNHc&$Df2NRX#&~z$&)^Nxin2K@uW%d z;@;-<^|BS4Z^+EY?#^Vs^ui7E7k4X$Zf<(_n%jM5!KQ8VlHa|3)-5%z#*MAv4am+t z?YFvX?>IV!4e#~7xbDx!k=tL8T{yIJ+nw6ccV^_Sj`ZgJWU?*l#+H_38vnT+0rS8J zfhaiwangZ={|si5C}RMV#+GJpePjI3uB2J_oN3M9-&)NL|9J53NdjrWCk9+Kmk)jX zE!X+%#wjN~!y-T*Oz)J4jHJQB>uqlk~7(9|to9&dYdta|UNlRIkvb`^dqUwV1MYd6ob zD|GuhGrrk-BY(n&J+H{#IaIP^Y1p;$_|l2t{Y@Qje`E($2S437v$*`Nt~cM`G-313 zn=4ml-#pVgb>;2n7ag3Pd;8jnOKZPVIJbKNF-V*q%8~zrV-FR#K_`qPmMH=h5^?b2ZF?&HN|Du62$62UaXEi z!En1vBU|lVGZc5;a_u>~VMF%&)YH9Vl9RrF@q%Sd7J354vpXs#UfA)sen?cRFzbN z!uwGvB$wvp&C+E2HnZo{(d_?RJbQ6@FkU;cV5dwPnVbL7pY)k$(!r2>C%IT^0D5uW z@LggSKlAz*8#+%~wq86tJafT2ZOWHTnRw2@{Uz5` { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', + JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); + } + + onForeground() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); + } + + onBackground() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); + } +} \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/ets/TestAbility/pages/Index.ets b/ai/intelligent_voice_framework/src/main/ets/TestAbility/pages/Index.ets new file mode 100755 index 000000000..166366593 --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/ets/TestAbility/pages/Index.ets @@ -0,0 +1,34 @@ +import hilog from '@ohos.hilog'; + +@Entry +@Component +struct Index { + aboutToAppear() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); + } + @State message: string = 'Hello World' + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .width('35%') + .height('5%') + .onClick(()=>{ + }) + } + .width('100%') + } + .height('100%') + } + } \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ai/intelligent_voice_framework/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts new file mode 100755 index 000000000..92a16d84e --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -0,0 +1,49 @@ +import hilog from '@ohos.hilog'; +import TestRunner from '@ohos.application.testRunner'; +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; + +var abilityDelegator = undefined +var abilityDelegatorArguments = undefined + +async function onAbilityCreateCallback() { + hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); +} + +async function addAbilityMonitorCallback(err: any) { + hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? ''); +} + +export default class OpenHarmonyTestRunner implements TestRunner { + constructor() { + } + + onPrepare() { + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare '); + } + + async onRun() { + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' + let lMonitor = { + abilityName: testAbilityName, + onAbilityCreate: onAbilityCreateCallback, + }; + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) + var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName + var debug = abilityDelegatorArguments.parameters['-D'] + if (debug == 'true') + { + cmd += ' -D' + } + hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); + abilityDelegator.executeShellCommand(cmd, + (err: any, d: any) => { + hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); + }) + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); + } +} \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/ets/test/EnrollIntelligentVoiceEngine.test.ets b/ai/intelligent_voice_framework/src/main/ets/test/EnrollIntelligentVoiceEngine.test.ets new file mode 100755 index 000000000..2c833bc20 --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/ets/test/EnrollIntelligentVoiceEngine.test.ets @@ -0,0 +1,526 @@ +import intelligentVoice from '@ohos.ai.intelligentVoice'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' + +export default function enrollIntelligentVoiceEngineTest() { +describe('ActsEnrollIntelligentVoiceEngineTest', function () { + let tag = "enrollIntelligentvoiceEngineTest"; + console.info(`${tag}: Create EnrollIntelligentvoiceEngine Object JS Framework`); + function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } + + function releaseEnrollEngine(enrollEngine, done) { + try { + enrollEngine.release(err => { + if (err) { + console.info(`${tag} releaseEnrollEngine err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} releaseEnrollEngine success`); + done(); + } + }); + } catch (error) { + console.info(`${tag} failed to releaseEnrollEngine: ${JSON.stringify(error)}`); + done(); + } + } + + function getParameter(enrollEngine, key, done) { + try { + enrollEngine.getParameter(key, (err, data) => { + if (err) { + console.info(`${tag} get parameter err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} get parameter success`); + let param = data; + expect(param).assertEqual('value'); + releaseEnrollEngine(enrollEngine, done); + } + }); + } catch (error) { + console.info(`${tag} failed to get parameter: ${JSON.stringify(error)}`); + done(); + } + } + + function setParameter(enrollEngine, key, value, done) { + try { + enrollEngine.setParameter(key, value, err => { + if (err) { + console.info(`${tag} set parameter err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} set parameter success`); + getParameter(enrollEngine, 'key', done); + } + }); + } catch (error) { + console.info(`${tag} failed to set parameter: ${JSON.stringify(error)}`); + done(); + } + } + + function setSensibility(enrollEngine, sensibility, done) { + try { + enrollEngine.setSensibility(sensibility, err => { + if (err) { + console.info(`${tag} set sensibility err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} set sensibility success`); + setParameter(enrollEngine, 'scene', '0', done); + } + }); + } catch (error) { + console.info(`${tag} failed to set sensibility: ${JSON.stringify(error)}`); + done(); + } + } + + function setWakeupHapInfo(enrollEngine, wakeupHapInfo, done) { + try { + enrollEngine.setWakeupHapInfo(wakeupHapInfo, err => { + if (err) { + console.info(`${tag} set wakeup hap info err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} set wakeup hap info success`); + setSensibility(enrollEngine, intelligentVoice.SensibilityType.MIDDLE_SENSIBILITY, done); + } + }); + } catch (error) { + console.info(`${tag} failed to set wakeup hap info: ${JSON.stringify(error)}`); + done(); + } + } + + function commit(enrollEngine, done) { + try { + enrollEngine.commit((err, data) => { + if (err) { + console.log(`${tag} commit err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} commit success`); + let wakeupHapInfo = { + bundleName: 'example_bundle_name', + abilityName: 'example_ability_name' + } + setWakeupHapInfo(enrollEngine, wakeupHapInfo, done); + } + }); + } catch(error) { + console.info(`${tag} failed to commit: ${JSON.stringify(error)}`); + done(); + } + } + + function stopEnrollEngine(enrollEngine, done) { + try { + enrollEngine.stop((err) => { + if (err) { + console.log(`${tag} stop enrollIntelligentvoiceEngine err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} stop enrollIntelligentvoiceEngine success`); + releaseEnrollEngine(enrollEngine, done); + } + }); + } catch(error) { + console.info(`${tag} failed to start enrollIntelligentvoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + + function startThenStopEnrollEngine(enrollEngine, done) { + try { + enrollEngine.enrollForResult(false, (err, data) => { + if (err) { + console.log(`${tag} start enrollIntelligentvoiceEngine err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} start enrollIntelligentvoiceEngine success`); + // expect(data.result).assertEqual(intelligentVoice.EnrollResult.SUCCESS); + expect(data.result).assertEqual(intelligentVoice.EnrollResult.UNKNOWN_ERROR); + stopEnrollEngine(enrollEngine, done); + } + }); + } catch(error) { + console.info(`${tag} failed to start enrollIntelligentvoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + + function startEnrollEngine(enrollEngine, cnt, done) { + try { + enrollEngine.enrollForResult(false, (err, data) => { + if (err) { + console.log(`${tag} start enrollIntelligentvoiceEngine err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} start enrollIntelligentvoiceEngine success, cnt: ${cnt}`); + // expect(data.result).assertEqual(intelligentVoice.EnrollResult.SUCCESS); + expect(data.result).assertEqual(intelligentVoice.EnrollResult.UNKNOWN_ERROR); + if (cnt < 0) { + startEnrollEngine(enrollEngine, cnt + 1, done); + } else { + commit(enrollEngine, done); + } + } + }); + } catch(error) { + console.info(`${tag} failed to start enrollIntelligentvoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + + function initEnrollEngine(enrollEngine, needStop, done) { + let config = { + language: 'zh', + region: 'CN' + } + try { + enrollEngine.init(config, (err, data) => { + if (err) { + console.log(`${tag} init enrollIntelligentvoiceEngine err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} init enrollIntelligentvoiceEngine success`); + if (needStop) { + startThenStopEnrollEngine(enrollEngine, done); + } else { + startEnrollEngine(enrollEngine, 0, done); + } + } + }); + } catch(error) { + console.info(`${tag} failed to init enrollIntelligentvoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + + function getSupportedRegions(enrollEngine, done) { + try { + enrollEngine.getSupportedRegions((err, data) => { + if (err) { + console.log(`${tag} get supported regions err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} get supported regions success`); + let regions = data; + expect(regions.length).assertEqual(1); + for (let region in regions) { + console.info(`supported region: ${region}`); + } + initEnrollEngine(enrollEngine, false, done); + } + }); + } catch (error) { + console.info(`${tag} failed to createEnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + + function enrollAsync(enrollEngine, done) { + try { + let descriptor = { + wakeupPhrase: '小艺小艺' + } + intelligentVoice.createEnrollIntelligentVoiceEngine(descriptor, (err, data) => { + if (err) { + console.log(`${tag} createEnrollIntelligentVoiceEngine err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} createEnrollIntelligentVoiceEngine success`); + enrollEngine = data; + getSupportedRegions(enrollEngine, done); + } + }); + } catch (error) { + console.info(`${tag} failed to createEnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + + function stopEnrollAsync(enrollEngine, done) { + try { + let descriptor = { + wakeupPhrase: '小艺小艺' + } + intelligentVoice.createEnrollIntelligentVoiceEngine(descriptor, (err, data) => { + if (err) { + console.log(`${tag} createEnrollIntelligentVoiceEngine err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} createEnrollIntelligentVoiceEngine success`); + enrollEngine = data; + initEnrollEngine(enrollEngine, true, done) + } + }); + } catch (error) { + console.info(`${tag} failed to createEnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + + async function enrollPromise(descriptor, done) { + let enrollEngine = null; + try { + enrollEngine = await intelligentVoice.createEnrollIntelligentVoiceEngine(descriptor); + console.log(`${tag} createEnrollIntelligentVoiceEngine success`); + } catch (error) { + console.info(`${tag} failed to createEnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + let regions = await enrollEngine.getSupportedRegions(); + console.log(`${tag} get supported regions success`); + expect(regions.length).assertEqual(1); + for (let region in regions) { + console.info(`supported region: ${region}`); + } + } catch (error) { + console.info(`${tag} failed to get supported regions : ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + let config = { + language: 'zh', + region: 'CN' + } + + try { + let initRet = await enrollEngine.init(config); + console.log(`${tag} init EnrollIntelligentVoiceEngine success`); + } catch(error) { + console.info(`${tag} failed to init EnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + let startRet = await enrollEngine.enrollForResult(false); + console.log(`${tag} start EnrollIntelligentVoiceEngine finish`); + // expect(startRet.result).assertEqual(intelligentVoice.EnrollResult.SUCCESS); + expect(startRet.result).assertEqual(intelligentVoice.EnrollResult.UNKNOWN_ERROR); + } catch(error) { + console.info(`${tag} failed to start EnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + let commitRet = await enrollEngine.commit(); + console.log(`${tag} commit enroll finish`); + } catch(error) { + console.info(`${tag} failed to commit enroll: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + let wakeupHapInfo = { + bundleName: 'example_bundle_name', + abilityName: 'example_ability_name' + } + await enrollEngine.setWakeupHapInfo(wakeupHapInfo); + console.log(`${tag} set wakeup hap info success`); + } catch(error) { + console.info(`${tag} failed to set wakeup hap info: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + await enrollEngine.setSensibility(intelligentVoice.SensibilityType.LOW_SENSIBILITY); + console.log(`${tag} set sensibility success`); + } catch(error) { + console.info(`${tag} failed to set sensibility: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + await enrollEngine.setParameter('scene', '0'); + console.log(`${tag} set parameter success`); + } catch(error) { + console.info(`${tag} failed to set parameter: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + let param = await enrollEngine.getParameter('key'); + console.log(`${tag} get parameter success`); + expect(param).assertEqual('value'); + } catch(error) { + console.info(`${tag} failed to get parameter: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + await enrollEngine.release(); + console.log(`${tag} release EnrollIntelligentVoiceEngine success`); + } catch(error) { + console.info(`${tag} failed to release EnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + done(); + } + async function stopEnrollPromise(descriptor, done) { + let enrollEngine = null; + try { + enrollEngine = await intelligentVoice.createEnrollIntelligentVoiceEngine(descriptor); + console.log(`${tag} createEnrollIntelligentVoiceEngine success`); + } catch (error) { + console.info(`${tag} failed to createEnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + let config = { + language: 'zh', + region: 'CN' + } + + try { + let initRet = await enrollEngine.init(config); + console.log(`${tag} init EnrollIntelligentVoiceEngine success`); + } catch(error) { + console.info(`${tag} failed to init EnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + await enrollEngine.stop(); + console.log(`${tag} stop EnrollIntelligentVoiceEngine success`); + } catch(error) { + console.info(`${tag} failed to stop EnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + await enrollEngine.release(); + console.log(`${tag} release EnrollIntelligentVoiceEngine success`); + } catch(error) { + console.info(`${tag} failed to release EnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + done(); + } + + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(async function () { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + console.info(`${tag}: beforeAll: Prerequisites at the test suite level`); + await sleep(100); + console.info(`${tag}: beforeAll: END`); + }) + beforeEach(async function () { + console.info(`${tag}: beforeEach: Prerequisites at the test case level`); + await sleep(100); + }) + afterEach(async function () { + console.info(`${tag}: afterEach: Test case-level clearance conditions`); + await sleep(100); + }) + afterAll(function () { + console.info(`${tag}: afterAll: Test suite-level cleanup condition`); + }) + + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_ENROLL_PROCESS_ASYNC_0100 + *@tc.name : INTELLIGENT_VOICE_ENROLL_PROCESS_ASYNC + *@tc.desc : INTELLIGENT_VOICE_ENROLL_PROCESS_ASYNC + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 3 + */ + it('SUB_AI_INTELLIGENT_VOICE_ENROLL_PROCESS_ASYNC_0100', 3, async function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let enrollEngine = null; + enrollAsync(enrollEngine, done); + }) + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_STOP_ENROLL_PROCESS_ASYNC_0100 + *@tc.name : INTELLIGENT_VOICE_STOP_ENROLL_PROCESS_ASYNC + *@tc.desc : INTELLIGENT_VOICE_STOP_ENROLL_PROCESS_ASYNC + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 2 + */ + it('SUB_AI_INTELLIGENT_VOICE_STOP_ENROLL_PROCESS_ASYNC_0100', 2, async function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let enrollEngine = null; + stopEnrollAsync(enrollEngine, done); + }) + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_ENROLL_PROCESS_PROMISE_0100 + *@tc.name : INTELLIGENT_VOICE_ENROLL_PROCESS_PROMISE + *@tc.desc : INTELLIGENT_VOICE_ENROLL_PROCESS_PROMISE + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 3 + */ + it('SUB_AI_INTELLIGENT_VOICE_ENROLL_PROCESS_PROMISE_0100', 3, async function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let descriptor = { + wakeupPhrase: '小艺小艺' + } + enrollPromise(descriptor, done); + }) + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_STOP_ENROLL_PROCESS_PROMISE_0100 + *@tc.name : INTELLIGENT_VOICE_STOP_ENROLL_PROCESS_PROMISE + *@tc.desc : INTELLIGENT_VOICE_STOP_ENROLL_PROCESS_PROMISE + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 2 + */ + it('SUB_AI_INTELLIGENT_VOICE_STOP_ENROLL_PROCESS_PROMISE_0100', 2, async function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let descriptor = { + wakeupPhrase: '小艺小艺' + } + stopEnrollPromise(descriptor, done); + }) +}) +} \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/ets/test/IntelligentVoiceManagerApi10.test.ets b/ai/intelligent_voice_framework/src/main/ets/test/IntelligentVoiceManagerApi10.test.ets new file mode 100755 index 000000000..1feabca51 --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/ets/test/IntelligentVoiceManagerApi10.test.ets @@ -0,0 +1,142 @@ +import intelligentVoice from '@ohos.ai.intelligentVoice'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' + +export default function intelligentVoiceManagerApi10Test() { +describe('ActsIntelligentVoiceManagerApi10Test', function () { + let tagFrmwk = "intelligentvoiceManagerApi10Test"; + console.info(`${tagFrmwk}: Create IntelligentvoiceManger Object JS Framework`); + let intelligentvoiceManager = null; + function getIntelligentvoiceManager() { + intelligentvoiceManager = intelligentVoice.getIntelligentVoiceManager(); + if (intelligentvoiceManager != null) { + console.info(`${tagFrmwk}: getIntelligentvoiceManger : PASS`); + } else { + console.info(`${tagFrmwk}: getIntelligentvoiceManger : FAIL`); + } + } + + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(async function () { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + console.info(`${tagFrmwk}: beforeAll: Prerequisites at the test suite level`); + await getIntelligentvoiceManager(); + console.info(`${tagFrmwk}: beforeAll: END`); + }) + beforeEach(async function () { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + console.info(`${tagFrmwk}: beforeEach: Prerequisites at the test case level`); + }) + afterEach(async function () { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + console.info(`${tagFrmwk}: afterEach: Test case-level clearance conditions`); + }) + afterAll(function () { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + console.info(`${tagFrmwk}: afterAll: Test suite-level cleanup condition`); + }) + + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_ENGINE_TYPE_0100 + *@tc.name : INTELLIGENT_VOICE_ENGINE_TYPE + *@tc.desc : INTELLIGENT_VOICE_ENGINE_TYPE + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 1 + */ + it('SUB_AI_INTELLIGENT_VOICE_ENGINE_TYPE_0100', 1, function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + expect(intelligentVoice.IntelligentVoiceEngineType.ENROLL_ENGINE_TYPE).assertEqual(0); + expect(intelligentVoice.IntelligentVoiceEngineType.WAKEUP_ENGINE_TYPE).assertEqual(1); + expect(intelligentVoice.IntelligentVoiceEngineType.UPDATE_ENGINE_TYPE).assertEqual(2); + done(); + }) + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_ENROLL_RESULT_0100 + *@tc.name : INTELLIGENT_VOICE_ENROLL_RESULT + *@tc.desc : INTELLIGENT_VOICE_ENROLL_RESULT + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 1 + */ + it('SUB_AI_INTELLIGENT_VOICE_ENROLL_RESULT_0100', 1, function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + expect(intelligentVoice.EnrollResult.SUCCESS).assertEqual(0); + expect(intelligentVoice.EnrollResult.VPR_TRAIN_FAILED).assertEqual(-1); + expect(intelligentVoice.EnrollResult.WAKEUP_PHRASE_NOT_MATCH).assertEqual(-2); + expect(intelligentVoice.EnrollResult.TOO_NOISY).assertEqual(-3); + expect(intelligentVoice.EnrollResult.TOO_LOUD).assertEqual(-4); + expect(intelligentVoice.EnrollResult.INTERVAL_LARGE).assertEqual(-5); + expect(intelligentVoice.EnrollResult.DIFFERENT_PERSON).assertEqual(-6); + expect(intelligentVoice.EnrollResult.UNKNOWN_ERROR).assertEqual(-100); + done(); + }) + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_WAKEUP_EVENT_0100 + *@tc.name : INTELLIGENT_VOICE_WAKEUP_EVENT + *@tc.desc : INTELLIGENT_VOICE_WAKEUP_EVENT + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 1 + */ + it('SUB_AI_INTELLIGENT_VOICE_WAKEUP_EVENT_0100', 1, function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + expect(intelligentVoice.WakeupIntelligentVoiceEventType.INTELLIGENT_VOICE_EVENT_WAKEUP_NONE).assertEqual(0); + expect(intelligentVoice.WakeupIntelligentVoiceEventType.INTELLIGENT_VOICE_EVENT_RECOGNIZE_COMPLETE).assertEqual(1); + done(); + }) + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_ERROR_CODE_0100 + *@tc.name : INTELLIGENT_VOICE_ERROR_CODE + *@tc.desc : INTELLIGENT_VOICE_ERROR_CODE + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 1 + */ + it('SUB_AI_INTELLIGENT_VOICE_ERROR_CODE_0100', 1, function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + expect(intelligentVoice.IntelligentVoiceErrorCode.INTELLIGENT_VOICE_NO_MEMORY).assertEqual(22700101); + expect(intelligentVoice.IntelligentVoiceErrorCode.INTELLIGENT_VOICE_INVALID_PARAM).assertEqual(22700102); + expect(intelligentVoice.IntelligentVoiceErrorCode.INTELLIGENT_VOICE_INIT_FAILED).assertEqual(22700103); + expect(intelligentVoice.IntelligentVoiceErrorCode.INTELLIGENT_VOICE_COMMIT_ENROLL_FAILED).assertEqual(22700104); + done(); + }) + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_ENGINE_MANAGER_0100 + *@tc.name : INTELLIGENT_VOICE_ENGINE_MANAGER + *@tc.desc : INTELLIGENT_VOICE_ENGINE_MANAGER + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 2 + */ + it('SUB_AI_INTELLIGENT_VOICE_ENGINE_MANAGER_0100', 2, function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + try { + let info = intelligentvoiceManager.getCapabilityInfo(); + expect(info.length).assertEqual(2); + for (let key in info) { + console.info(`supported intelligent voice engine type: ${key}`); + } + } catch (error) { + console.info(`failed to get supported intelligent voice engine type: ${JSON.stringify(error)}`); + done(); + return; + } + + intelligentvoiceManager.on('serviceChange', (serviceChangeType) => {}); + expect(true).assertTrue(); + intelligentvoiceManager.off('serviceChange'); + expect(true).assertTrue(); + + expect(intelligentVoice.ServiceChangeType.SERVICE_UNAVAILABLE).assertEqual(0); + // expect(intelligentVoice.IntelligentVoiceEngineType.WAKEUP_ENGINE_TYPE).assertEqual(1); + // expect(intelligentVoice.IntelligentVoiceEngineType.UPDATE_ENGINE_TYPE).assertEqual(2); + done(); + }) +}) +} \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/ets/test/List.test.ets b/ai/intelligent_voice_framework/src/main/ets/test/List.test.ets new file mode 100755 index 000000000..306927496 --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/ets/test/List.test.ets @@ -0,0 +1,9 @@ +import intelligentVoiceManagerApi10Test from './IntelligentVoiceManagerApi10.test' +import enrollIntelligentVoiceEngineTest from './EnrollIntelligentVoiceEngine.test' +import wakeupIntelligentVoiceEngineTest from './WakeupIntelligentVoiceEngine.test' + +export default function testsuite() { + intelligentVoiceManagerApi10Test() + enrollIntelligentVoiceEngineTest() + wakeupIntelligentVoiceEngineTest() +} \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/ets/test/WakeupIntelligentVoiceEngine.test.ets b/ai/intelligent_voice_framework/src/main/ets/test/WakeupIntelligentVoiceEngine.test.ets new file mode 100755 index 000000000..341ce5808 --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/ets/test/WakeupIntelligentVoiceEngine.test.ets @@ -0,0 +1,305 @@ +import intelligentVoice from '@ohos.ai.intelligentVoice'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' + +export default function wakeupIntelligentVoiceEngineTest() { +describe('ActsWakeupIntelligentVoiceEngineTest', function () { + let tag = "wakeupIntelligentvoiceEngineTest"; + console.info(`${tag}: Create WakeupIntelligentvoiceEngine Object JS Framework`); + function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } + + function releaseWakeupEngine(wakeupEngine, done) { + try { + wakeupEngine.release(err => { + if (err) { + console.info(`${tag} releaseWakeupEngine err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} releaseWakeupEngine success`); + done(); + } + }); + } catch (error) { + console.info(`${tag} failed to releaseWakeupEngine: ${JSON.stringify(error)}`); + done(); + } + } + + function getParameter(wakeupEngine, key, done) { + try { + wakeupEngine.getParameter(key, (err, data) => { + if (err) { + console.info(`${tag} get parameter err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} get parameter success`); + let param = data; + expect(param).assertEqual('value'); + releaseWakeupEngine(wakeupEngine, done); + } + }); + } catch (error) { + console.info(`${tag} failed to get parameter: ${JSON.stringify(error)}`); + done(); + } + } + + function setParameter(wakeupEngine, key, value, done) { + try { + wakeupEngine.setParameter(key, value, err => { + if (err) { + console.info(`${tag} set parameter err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} set parameter success`); + getParameter(wakeupEngine, 'key', done); + } + }); + } catch (error) { + console.info(`${tag} failed to set parameter: ${JSON.stringify(error)}`); + done(); + } + } + + function setSensibility(wakeupEngine, sensibility, done) { + try { + wakeupEngine.setSensibility(sensibility, err => { + if (err) { + console.info(`${tag} set sensibility err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} set sensibility success`); + setParameter(wakeupEngine, 'scene', '0', done); + } + }); + } catch (error) { + console.info(`${tag} failed to set sensibility: ${JSON.stringify(error)}`); + done(); + } + } + + function setWakeupHapInfo(wakeupEngine, wakeupHapInfo, done) { + try { + wakeupEngine.setWakeupHapInfo(wakeupHapInfo, err => { + if (err) { + console.info(`${tag} set wakeup hap info err: ${JSON.stringify(err)}`); + done(); + return; + } else { + console.log(`${tag} set wakeup hap info success`); + setSensibility(wakeupEngine, intelligentVoice.SensibilityType.MIDDLE_SENSIBILITY, done); + } + }); + } catch (error) { + console.info(`${tag} failed to set wakeup hap info: ${JSON.stringify(error)}`); + done(); + } + } + + function getSupportedRegions(wakeupEngine, done) { + try { + wakeupEngine.getSupportedRegions((err, data) => { + if (err) { + console.log(`${tag} get supported regions err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} get supported regions success`); + let regions = data; + expect(regions.length).assertEqual(1); + for (let region in regions) { + console.info(`supported region: ${region}`); + } + let wakeupHapInfo = { + bundleName: 'example_bundle_name', + abilityName: 'example_ability_name' + } + setWakeupHapInfo(wakeupEngine, wakeupHapInfo, done); + } + }); + } catch (error) { + console.info(`${tag} failed to createEnrollIntelligentVoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + function wakeupAsync(wakeupEngine, done) { + try { + let descriptor = { + needApAlgEngine: true, + wakeupPhrase: '小艺小艺' + } + intelligentVoice.createWakeupIntelligentVoiceEngine(descriptor, (err, data) => { + if (err) { + console.log(`${tag} createWakeupIntelligentVoiceEngine err: ${JSON.stringify(err)}`); + expect(false).assertTrue(); + done(); + } else { + console.log(`${tag} createWakeupIntelligentVoiceEngine success`); + wakeupEngine = data; + getSupportedRegions(wakeupEngine, done); + } + }); + } catch (error) { + console.info(`${tag} failed to createWakeupIntelligentVoiceEngine: ${JSON.stringify(error)}`); + done(); + } + } + + async function wakeupPromise(descriptor, done) { + let wakeupEngine = null; + try { + wakeupEngine = await intelligentVoice.createWakeupIntelligentVoiceEngine(descriptor); + console.log(`${tag} createWakeupIntelligentVoiceEngine success`); + } catch (error) { + console.info(`${tag} failed to createWakeupIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + let regions = await wakeupEngine.getSupportedRegions(); + console.log(`${tag} get supported regions success`); + expect(regions.length).assertEqual(1); + for (let region in regions) { + console.info(`supported region: ${region}`); + } + } catch (error) { + console.info(`${tag} failed to get supported regions: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + let wakeupHapInfo = { + bundleName: 'example_bundle_name', + abilityName: 'example_ability_name' + } + await wakeupEngine.setWakeupHapInfo(wakeupHapInfo); + console.log(`${tag} set wakeup hap info success`); + } catch (error) { + console.info(`${tag} failed to set wakeup hap info: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + await wakeupEngine.setSensibility(intelligentVoice.SensibilityType.HIGH_SENSIBILITY); + console.log(`${tag} set sensibility success`); + } catch(error) { + console.info(`${tag} failed to set sensibility: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + await wakeupEngine.setParameter('scene', '0'); + console.log(`${tag} set parameter success`); + } catch(error) { + console.info(`${tag} failed to set parameter: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + let param = await wakeupEngine.getParameter('key'); + console.log(`${tag} get parameter success`); + expect(param).assertEqual('value'); + } catch(error) { + console.info(`${tag} failed to get parameter: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + wakeupEngine.on('wakeupIntelligentVoiceEvent', (callback) => { + console.info(`${tag}: wakeup intelligentvoice event`); + for (let prop in callback) { + console.info(`${tag}: intelligentvoice prop: ${prop}`); + } + }); + console.log(`${tag} register wakeup event success`); + wakeupEngine.off('wakeupIntelligentVoiceEvent'); + console.log(`${tag} unregister wakeup event success`); + expect(true).assertTrue(); + done(); + } catch(error) { + console.info(`${tag} failed to register wakeup event: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + + try { + await wakeupEngine.release(); + console.log(`${tag} release WakeupIntelligentVoiceEngine success`); + } catch(error) { + console.info(`${tag} failed to release WakeupIntelligentVoiceEngine: ${JSON.stringify(error)}`); + expect(false).assertTrue(); + done(); + return; + } + done(); + } + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(async function () { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + console.info(`${tag}: beforeAll: Prerequisites at the test suite level`); + await sleep(100); + console.info(`${tag}: beforeAll: END`); + }) + beforeEach(async function () { + console.info(`${tag}: beforeEach: Prerequisites at the test case level`); + await sleep(100); + }) + afterEach(async function () { + console.info(`${tag}: afterEach: Test case-level clearance conditions`); + await sleep(100); + }) + afterAll(function () { + console.info(`${tag}: afterAll: Test suite-level cleanup condition`); + }) + + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_WAKEUP_PROCESS_ASYNC_0100 + *@tc.name : INTELLIGENT_VOICE_WAKEUP_PROCESS_ASYNC + *@tc.desc : INTELLIGENT_VOICE_WAKEUP_PROCESS_ASYNC + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 3 + */ + it('SUB_AI_INTELLIGENT_VOICE_WAKEUP_PROCESS_ASYNC_0100', 3, async function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let wakeupEngine = null; + + wakeupAsync(wakeupEngine, done); + }) + /** + *@tc.number : SUB_AI_INTELLIGENT_VOICE_WAKEUP_PROCESS_PROMISE_0100 + *@tc.name : INTELLIGENT_VOICE_WAKEUP_PROCESS_PROMISE + *@tc.desc : INTELLIGENT_VOICE_WAKEUP_PROCESS_PROMISE + *@tc.size : MEDIUM + *@tc.type : Function + *@tc.level : Level 3 + */ + it('SUB_AI_INTELLIGENT_VOICE_WAKEUP_PROCESS_PROMISE_0100', 3, async function (done) { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let descriptor = { + needApAlgEngine: true, + wakeupPhrase: '小艺小艺' + } + wakeupPromise(descriptor, done); + }) +}) +} \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/module.json b/ai/intelligent_voice_framework/src/main/module.json new file mode 100755 index 000000000..cf86f4bff --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/module.json @@ -0,0 +1,37 @@ +{ + "module": { + "name": "entry_test", + "type": "feature", + "description": "$string:module_test_desc", + "mainElement": "TestAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:test_pages", + "abilities": [ + { + "name": "TestAbility", + "srcEntry": "./ets/TestAbility/TestAbility.ets", + "description": "$string:TestAbility_desc", + "icon": "$media:icon", + "label": "$string:TestAbility_label", + "exported": true, + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "skills": [ + { + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + } + ] + } + ] + } +} diff --git a/ai/intelligent_voice_framework/src/main/resources/base/element/color.json b/ai/intelligent_voice_framework/src/main/resources/base/element/color.json new file mode 100755 index 000000000..3c712962d --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/resources/base/element/string.json b/ai/intelligent_voice_framework/src/main/resources/base/element/string.json new file mode 100755 index 000000000..1057d34da --- /dev/null +++ b/ai/intelligent_voice_framework/src/main/resources/base/element/string.json @@ -0,0 +1,24 @@ +{ + "string": [ + { + "name": "module_test_desc", + "value": "test ability description" + }, + { + "name": "TestAbility_desc", + "value": "the test ability" + }, + { + "name": "TestAbility_label", + "value": "test label" + }, + { + "name": "description_application", + "value": "demo for test" + }, + { + "name": "app_name", + "value": "Demo" + } + ] +} \ No newline at end of file diff --git a/ai/intelligent_voice_framework/src/main/resources/base/media/icon.png b/ai/intelligent_voice_framework/src/main/resources/base/media/icon.png new file mode 100755 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqau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