Skip to content

Commit f29a90f

Browse files
authored
Updated Native Ionic code folder (#20)
* Added plugin and native ionic code * Removed the cognitive services plugin .DS_Store file from gitignore, and added all .DS_Store files. * Renamed Native Ionic Folder. Updated Readme. * Added images for README * Renamed cognitiveservicesPlugin folder
1 parent 66ae70c commit f29a90f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4470
-9
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.DS_Store
2-
cogservPlugin/node_modules/
3-
cogservPlugin/.gradle/
4-
cogservPlugin/platforms/
5-
cogservPlugin/src/ios/MicrosoftCognitiveServicesSpeech.framework/
6-
cogservPlugin/aar
2+
cognitiveservicesPlugin/node_modules/
3+
cognitiveservicesPlugin/.gradle/
4+
cognitiveservicesPlugin/platforms/
5+
cognitiveservicesPlugin/src/ios/MicrosoftCognitiveServicesSpeech.framework/
6+
cognitiveservicesPlugin/aar

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Environments.ts file.
7272
In the folder of the Ionic Application (ie examples/ionic-angular), run the following steps.
7373

7474
Run the following command to install all packages within the app. In a terminal
75-
window, browse to the speecthtoText folder
75+
window, browse to the examples/ionic-angular folder
7676
and run the following:
7777

7878
```bash
@@ -94,7 +94,7 @@ npm i -g cordova
9494
To include the wrapper for the Cognitive Services plugin as an observable, run the following command:
9595

9696
```bash
97-
cp -r ../cogservicesNative ../examples/ionic-angular/node_modules/@ionic-native/
97+
cp -r ../cognitiveservices ../examples/ionic-angular/node_modules/@ionic-native/
9898
```
9999

100100
While this should install all components, there have been a few changes to
@@ -108,11 +108,11 @@ cordova platform remove ios
108108
cordova platform add ios
109109
```
110110

111-
## Run it Application
111+
## Run the Application
112112

113113
### Run on Browser
114114

115-
To run the application, in a terminal window, browse to the speecthtoText folder
115+
To run the application, in a terminal window, browse to the examples/ionic-angular folder
116116
and run the following:
117117

118118
```bash

cognitiveservices/index.d.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { IonicNativePlugin } from '@ionic-native/core';
2+
import { Observable } from 'rxjs';
3+
/**
4+
* @name cognitiveservices
5+
* @description
6+
* This plugin does something
7+
*
8+
* @usage
9+
* ```typescript
10+
* import { cognitiveservices } from '@ionic-native/cognitiveservices';
11+
*
12+
*
13+
* constructor(private cognitiveservices: cognitiveservices) { }
14+
*
15+
* ...
16+
*
17+
*
18+
* this.cognitiveservices.functionName('Hello', 123)
19+
* .then((res: any) => console.log(res))
20+
* .catch((error: any) => console.error(error));
21+
*
22+
* ```
23+
*/
24+
export interface SpeechVoiceOptions {
25+
language?: string;
26+
pitch?: string;
27+
voice?: string;
28+
}
29+
export declare class CognitiveServicesOriginal extends IonicNativePlugin {
30+
/**
31+
* This function does something
32+
* @param arg1 {string} Some param to configure something
33+
* @param arg2 {number} Another param to configure something
34+
* @return {Promise<any>} Returns a promise that resolves when something happens
35+
*/
36+
SetSubscription(speechSubscriptionKey: string, serviceRegion: string): Promise<void>;
37+
RecognizeFromMicrophone(): Observable<Array<Object>>;
38+
SpeakSsml(speechText: string): Promise<string>;
39+
SpeakSsmlAsync(speechText: string): Promise<string>;
40+
SpeakText(speechText: string): Promise<string>;
41+
SpeakTextAsync(speechText: string): Promise<string>;
42+
StopListening(): Promise<void>;
43+
SpeakWithVoiceOptions(speechText: string, options?: SpeechVoiceOptions): Promise<void>;
44+
SpeakStop(): Promise<void>;
45+
}
46+
47+
export declare const CognitiveServices: CognitiveServicesOriginal;

cognitiveservices/index.js

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cognitiveservices/ngx/index.d.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { IonicNativePlugin } from '@ionic-native/core';
2+
import { Observable } from 'rxjs';
3+
/**
4+
* @name cognitiveservices
5+
* @description
6+
* This plugin does something
7+
*
8+
* @usage
9+
* ```typescript
10+
* import { cognitiveservices } from '@ionic-native/cognitiveservices';
11+
*
12+
*
13+
* constructor(private cognitiveservices: cognitiveservices) { }
14+
*
15+
* ...
16+
*
17+
*
18+
* this.cognitiveservices.functionName('Hello', 123)
19+
* .then((res: any) => console.log(res))
20+
* .catch((error: any) => console.error(error));
21+
*
22+
* ```
23+
*/
24+
export interface SpeechVoiceOptions {
25+
language?: string;
26+
pitch?: string;
27+
voice?: string;
28+
}
29+
export declare class CognitiveServices extends IonicNativePlugin {
30+
/**
31+
* This function does something
32+
* @param arg1 {string} Some param to configure something
33+
* @param arg2 {number} Another param to configure something
34+
* @return {Promise<any>} Returns a promise that resolves when something happens
35+
*/
36+
SetSubscription(speechSubscriptionKey: string, serviceRegion: string): Promise<void>;
37+
RecognizeFromMicrophone(): Observable<Array<Object>>;
38+
SpeakSsml(speechText: string): Promise<string>;
39+
SpeakSsmlAsync(speechText: string): Promise<string>;
40+
SpeakText(speechText: string): Promise<string>;
41+
SpeakTextAsync(speechText: string): Promise<string>;
42+
StopListening(): Promise<void>;
43+
SpeakWithVoiceOptions(speechText: string, options?: SpeechVoiceOptions): Promise<void>;
44+
SpeakStop(): Promise<void>;
45+
}

cognitiveservices/ngx/index.js

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[
2+
{
3+
"__symbolic": "module",
4+
"version": 4,
5+
"metadata": {
6+
"SpeechVoiceOptions": { "__symbolic": "interface" },
7+
"CognitiveServices": {
8+
"__symbolic": "class",
9+
"extends": {
10+
"__symbolic": "reference",
11+
"module": "@ionic-native/core",
12+
"name": "IonicNativePlugin",
13+
"line": 40,
14+
"character": 39
15+
},
16+
"decorators": [
17+
{
18+
"__symbolic": "call",
19+
"expression": {
20+
"__symbolic": "reference",
21+
"module": "@angular/core",
22+
"name": "Injectable",
23+
"line": 39,
24+
"character": 1
25+
}
26+
}
27+
],
28+
"members": {
29+
"SetSubscription": [{ "__symbolic": "method" }],
30+
"RecognizeFromMicrophone": [{ "__symbolic": "method" }],
31+
"SpeakSsml": [{ "__symbolic": "method" }],
32+
"SpeakSsmlAsync": [{ "__symbolic": "method" }],
33+
"SpeakText": [{ "__symbolic": "method" }],
34+
"SpeakTextAsync": [{ "__symbolic": "method" }],
35+
"StopListening": [{ "__symbolic": "method" }],
36+
"SpeakWithVoiceOptions": [{ "__symbolic": "method" }],
37+
"SpeakStop": [{ "__symbolic": "method" }]
38+
}
39+
}
40+
}
41+
}
42+
]

0 commit comments

Comments
 (0)