expo-speech 10.1.0 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +3 -3
- package/android/build.gradle +41 -27
- package/build/ExponentSpeech.d.ts +1 -0
- package/build/ExponentSpeech.d.ts.map +1 -0
- package/build/ExponentSpeech.web.d.ts +1 -0
- package/build/ExponentSpeech.web.d.ts.map +1 -0
- package/build/Speech.d.ts +1 -0
- package/build/Speech.d.ts.map +1 -0
- package/build/Speech.types.d.ts +9 -1
- package/build/Speech.types.d.ts.map +1 -0
- package/build/Speech.types.js.map +1 -1
- package/package.json +2 -2
- package/src/Speech/Speech.types.ts +8 -1
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,22 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 10.3.0 — 2022-07-07
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 10.2.0 — 2022-04-18
|
|
18
|
+
|
|
19
|
+
### ⚠️ Notices
|
|
20
|
+
|
|
21
|
+
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
|
|
22
|
+
|
|
23
|
+
## 10.1.1 - 2022-02-01
|
|
24
|
+
|
|
25
|
+
### 🐛 Bug fixes
|
|
26
|
+
|
|
27
|
+
- Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
|
|
28
|
+
|
|
13
29
|
## 10.1.0 — 2021-12-03
|
|
14
30
|
|
|
15
31
|
_This version does not introduce any user-facing changes._
|
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@ Provides text-to-speech functionality.
|
|
|
4
4
|
|
|
5
5
|
# API documentation
|
|
6
6
|
|
|
7
|
-
- [Documentation for the
|
|
8
|
-
- [Documentation for the latest stable release](https://docs.expo.
|
|
7
|
+
- [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/speech.md)
|
|
8
|
+
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/speech/)
|
|
9
9
|
|
|
10
10
|
# Installation in managed Expo projects
|
|
11
11
|
|
|
12
|
-
For
|
|
12
|
+
For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/speech/).
|
|
13
13
|
|
|
14
14
|
# Installation in bare React Native projects
|
|
15
15
|
|
package/android/build.gradle
CHANGED
|
@@ -1,74 +1,88 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
apply plugin: 'kotlin-android'
|
|
3
|
-
apply plugin: 'maven'
|
|
3
|
+
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '10.
|
|
6
|
+
version = '10.3.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
10
|
+
if (expoModulesCorePlugin.exists()) {
|
|
11
|
+
apply from: expoModulesCorePlugin
|
|
12
|
+
applyKotlinExpoModulesCorePlugin()
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
10
16
|
ext.safeExtGet = { prop, fallback ->
|
|
11
17
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
12
18
|
}
|
|
13
19
|
|
|
20
|
+
// Ensures backward compatibility
|
|
21
|
+
ext.getKotlinVersion = {
|
|
22
|
+
if (ext.has("kotlinVersion")) {
|
|
23
|
+
ext.kotlinVersion()
|
|
24
|
+
} else {
|
|
25
|
+
ext.safeExtGet("kotlinVersion", "1.6.10")
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
repositories {
|
|
15
30
|
mavenCentral()
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
dependencies {
|
|
19
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${
|
|
34
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
|
|
23
|
-
// Upload android library to maven with javadoc and android sources
|
|
24
|
-
configurations {
|
|
25
|
-
deployerJars
|
|
26
|
-
}
|
|
27
|
-
|
|
28
38
|
// Creating sources with comments
|
|
29
39
|
task androidSourcesJar(type: Jar) {
|
|
30
40
|
classifier = 'sources'
|
|
31
41
|
from android.sourceSets.main.java.srcDirs
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
afterEvaluate {
|
|
45
|
+
publishing {
|
|
46
|
+
publications {
|
|
47
|
+
release(MavenPublication) {
|
|
48
|
+
from components.release
|
|
49
|
+
// Add additional sourcesJar to artifacts
|
|
50
|
+
artifact(androidSourcesJar)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
repositories {
|
|
54
|
+
maven {
|
|
55
|
+
url = mavenLocal().url
|
|
56
|
+
}
|
|
44
57
|
}
|
|
45
58
|
}
|
|
46
59
|
}
|
|
47
60
|
|
|
48
61
|
android {
|
|
49
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
62
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
|
50
63
|
|
|
51
64
|
compileOptions {
|
|
52
|
-
sourceCompatibility JavaVersion.
|
|
53
|
-
targetCompatibility JavaVersion.
|
|
65
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
66
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
kotlinOptions {
|
|
70
|
+
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
54
71
|
}
|
|
55
72
|
|
|
56
73
|
defaultConfig {
|
|
57
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
58
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
75
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
59
76
|
versionCode 18
|
|
60
|
-
versionName "10.
|
|
77
|
+
versionName "10.3.0"
|
|
61
78
|
}
|
|
62
79
|
lintOptions {
|
|
63
80
|
abortOnError false
|
|
64
81
|
}
|
|
65
|
-
kotlinOptions {
|
|
66
|
-
jvmTarget = JavaVersion.VERSION_1_8
|
|
67
|
-
}
|
|
68
82
|
}
|
|
69
83
|
|
|
70
84
|
dependencies {
|
|
71
85
|
implementation project(':expo-modules-core')
|
|
72
86
|
|
|
73
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${
|
|
87
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
74
88
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExponentSpeech.d.ts","sourceRoot":"","sources":["../src/Speech/ExponentSpeech.ts"],"names":[],"mappings":";AACA,wBAAiD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExponentSpeech.web.d.ts","sourceRoot":"","sources":["../src/Speech/ExponentSpeech.web.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;;;cA2BrD,MAAM,QAAQ,MAAM,WAAW,aAAa,GAAG,QAAQ,wBAAwB,CAAC;iBAiE7E,QAAQ,QAAQ,EAAE,CAAC;kBAYlB,QAAQ,OAAO,CAAC;YAGtB,QAAQ,IAAI,CAAC;aAGZ,QAAQ,IAAI,CAAC;cAGZ,QAAQ,IAAI,CAAC;;;AA1F/B,wBA8FE"}
|
package/build/Speech.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Speech.d.ts","sourceRoot":"","sources":["../src/Speech/Speech.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAInG,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAoD7E;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,QAK9D;AAGD;;;GAGG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAKhE;AAGD;;;;GAIG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAExD;AAGD;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1C;AAGD;;GAEG;AACH,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAK3C;AAGD;;;GAGG;AACH,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAM5C;AAoBD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAgE,CAAC"}
|
package/build/Speech.types.d.ts
CHANGED
|
@@ -26,10 +26,17 @@ export declare type SpeechOptions = {
|
|
|
26
26
|
*/
|
|
27
27
|
onDone?: () => void | SpeechEventCallback;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* A callback that is invoked when an error occurred while speaking.
|
|
30
30
|
* @param error
|
|
31
|
+
* @platform android
|
|
31
32
|
*/
|
|
32
33
|
onError?: (error: Error) => void | SpeechEventCallback;
|
|
34
|
+
/**
|
|
35
|
+
* Volume of the voice to speak `text`. A number between `0.0` (muted) and `1.0` (max volume)
|
|
36
|
+
*
|
|
37
|
+
* @default 1.0
|
|
38
|
+
* @platform web
|
|
39
|
+
*/
|
|
33
40
|
volume?: number;
|
|
34
41
|
/**
|
|
35
42
|
* Voice identifier.
|
|
@@ -75,3 +82,4 @@ export declare type WebVoice = Voice & {
|
|
|
75
82
|
name: string;
|
|
76
83
|
voiceURI: string;
|
|
77
84
|
};
|
|
85
|
+
//# sourceMappingURL=Speech.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Speech.types.d.ts","sourceRoot":"","sources":["../src/Speech/Speech.types.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB,GAAG,CAAC,IAAI,EAAE,wBAAwB,EAAE,EAAE,EAAE,oBAAoB,KAAK,GAAG,CAAC;AAGpG,oBAAY,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,mBAAmB,CAAC;IAC3C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,mBAAmB,CAAC;IAC7C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,GAAG,mBAAmB,CAAC;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,mBAAmB,CAAC;IACvD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACvC,CAAC;AAGF;;GAEG;AACH,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAGD;;GAEG;AACH,oBAAY,KAAK,GAAG;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAGF,oBAAY,QAAQ,GAAG,KAAK,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Speech.types.js","sourceRoot":"","sources":["../src/Speech/Speech.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Speech.types.js","sourceRoot":"","sources":["../src/Speech/Speech.types.ts"],"names":[],"mappings":"AAqDA,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["export type SpeechEventCallback = (this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any;\n\n// @needsAudit @docsMissing\nexport type SpeechOptions = {\n /**\n * The code of a language that should be used to read the `text`, refer to IETF BCP 47 to see\n * valid codes.\n */\n language?: string;\n /**\n * Pitch of the voice to speak `text`. `1.0` is the normal pitch.\n */\n pitch?: number;\n /**\n * Rate of the voice to speak `text`. `1.0` is the normal rate.\n */\n rate?: number;\n /**\n * A callback that is invoked when speaking starts.\n */\n onStart?: () => void | SpeechEventCallback;\n /**\n * A callback that is invoked when speaking is stopped by calling `Speech.stop()`.\n */\n onStopped?: () => void | SpeechEventCallback;\n /**\n * A callback that is invoked when speaking finishes.\n */\n onDone?: () => void | SpeechEventCallback;\n /**\n * A callback that is invoked when an error occurred while speaking.\n * @param error\n * @platform android\n */\n onError?: (error: Error) => void | SpeechEventCallback;\n /**\n * Volume of the voice to speak `text`. A number between `0.0` (muted) and `1.0` (max volume)\n *\n * @default 1.0\n * @platform web\n */\n volume?: number;\n /**\n * Voice identifier.\n */\n voice?: string;\n _voiceIndex?: number;\n onBoundary?: SpeechEventCallback | null;\n onMark?: SpeechEventCallback | null;\n onPause?: SpeechEventCallback | null;\n onResume?: SpeechEventCallback | null;\n};\n\n// @needsAudit\n/**\n * Enum representing the voice quality.\n */\nexport enum VoiceQuality {\n Default = 'Default',\n Enhanced = 'Enhanced',\n}\n\n// @needsAudit\n/**\n * Object describing the available voices on the device.\n */\nexport type Voice = {\n /**\n * Voice unique identifier.\n */\n identifier: string;\n /**\n * Voice name.\n */\n name: string;\n /**\n * Voice quality.\n */\n quality: VoiceQuality;\n /**\n * Voice language.\n */\n language: string;\n};\n\n// @docsMissing\nexport type WebVoice = Voice & {\n isDefault: boolean;\n localService: boolean;\n name: string;\n voiceURI: string;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-speech",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "Provides text-to-speech functionality.",
|
|
5
5
|
"main": "build/Speech.js",
|
|
6
6
|
"types": "build/Speech.d.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"expo": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "6e131f2da851a47c3a24eb3d6fc971a1a7822086"
|
|
46
46
|
}
|
|
@@ -28,10 +28,17 @@ export type SpeechOptions = {
|
|
|
28
28
|
*/
|
|
29
29
|
onDone?: () => void | SpeechEventCallback;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* A callback that is invoked when an error occurred while speaking.
|
|
32
32
|
* @param error
|
|
33
|
+
* @platform android
|
|
33
34
|
*/
|
|
34
35
|
onError?: (error: Error) => void | SpeechEventCallback;
|
|
36
|
+
/**
|
|
37
|
+
* Volume of the voice to speak `text`. A number between `0.0` (muted) and `1.0` (max volume)
|
|
38
|
+
*
|
|
39
|
+
* @default 1.0
|
|
40
|
+
* @platform web
|
|
41
|
+
*/
|
|
35
42
|
volume?: number;
|
|
36
43
|
/**
|
|
37
44
|
* Voice identifier.
|
package/tsconfig.json
CHANGED