expo-speech 13.1.2 → 13.1.3
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 +4 -0
- package/android/build.gradle +2 -2
- package/build/ExponentSpeech.web.d.ts.map +1 -1
- package/build/ExponentSpeech.web.js +1 -1
- package/build/ExponentSpeech.web.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2.module → 13.1.3/expo.modules.speech-13.1.3.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.3/expo.modules.speech-13.1.3.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.3/expo.modules.speech-13.1.3.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.3/expo.modules.speech-13.1.3.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.3/expo.modules.speech-13.1.3.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2.pom → 13.1.3/expo.modules.speech-13.1.3.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.3/expo.modules.speech-13.1.3.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.3/expo.modules.speech-13.1.3.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.3/expo.modules.speech-13.1.3.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.3/expo.modules.speech-13.1.3.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml.sha512 +1 -1
- package/package.json +2 -2
- package/src/Speech/ExponentSpeech.web.ts +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.2/expo.modules.speech-13.1.2.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.2/expo.modules.speech-13.1.2.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.2/expo.modules.speech-13.1.2.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.2/expo.modules.speech-13.1.2.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.2/expo.modules.speech-13.1.2.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.2/expo.modules.speech-13.1.2.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.2/expo.modules.speech-13.1.2.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.speech/13.1.2/expo.modules.speech-13.1.2.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2-sources.jar → 13.1.3/expo.modules.speech-13.1.3-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2-sources.jar.md5 → 13.1.3/expo.modules.speech-13.1.3-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2-sources.jar.sha1 → 13.1.3/expo.modules.speech-13.1.3-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2-sources.jar.sha256 → 13.1.3/expo.modules.speech-13.1.3-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2-sources.jar.sha512 → 13.1.3/expo.modules.speech-13.1.3-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2.aar → 13.1.3/expo.modules.speech-13.1.3.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2.aar.md5 → 13.1.3/expo.modules.speech-13.1.3.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2.aar.sha1 → 13.1.3/expo.modules.speech-13.1.3.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2.aar.sha256 → 13.1.3/expo.modules.speech-13.1.3.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.speech/{13.1.2/expo.modules.speech-13.1.2.aar.sha512 → 13.1.3/expo.modules.speech-13.1.3.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExponentSpeech.web.d.ts","sourceRoot":"","sources":["../src/Speech/ExponentSpeech.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAqB,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;AAuBvE,KAAK,gBAAgB,GAAG;IACtB,0BAA0B,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,oBAAoB,CAAA;KAAE,KAAK,IAAI,CAAC;IAChG,uBAAuB,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,oBAAoB,CAAA;KAAE,KAAK,IAA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C","sourcesContent":["import { CodedError, NativeModule, registerWebModule } from 'expo-modules-core';\n\nimport { SpeechOptions, WebVoice, VoiceQuality } from './Speech.types';\n\n//https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/text\nconst MAX_SPEECH_INPUT_LENGTH = 32767;\n\nasync function getVoices(): Promise<SpeechSynthesisVoice[]> {\n return new Promise<SpeechSynthesisVoice[]>((resolve) => {\n const voices = window.speechSynthesis.getVoices();\n\n if (voices.length > 0) {\n resolve(voices);\n return;\n }\n\n // when a page loads it takes some amount of time to populate the voices list\n // see https://stackoverflow.com/a/52005323/4337317\n window.speechSynthesis.onvoiceschanged = function () {\n const voices = window.speechSynthesis.getVoices();\n resolve(voices);\n };\n });\n}\n\ntype ExpoSpeechEvents = {\n 'Exponent.speakingStarted': (params: { id: string; nativeEvent: SpeechSynthesisEvent }) => void;\n 'Exponent.speakingDone': (params: { id: string; nativeEvent: SpeechSynthesisEvent }) => void;\n 'Exponent.speakingStopped': (params: { id: string; nativeEvent: SpeechSynthesisEvent }) => void;\n 'Exponent.speakingError': (params: { id: string; nativeEvent: SpeechSynthesisEvent }) => void;\n};\n\nclass ExpoSpeech extends NativeModule<ExpoSpeechEvents> {\n async speak(id: string, text: string, options: SpeechOptions): Promise<SpeechSynthesisUtterance> {\n if (text.length > MAX_SPEECH_INPUT_LENGTH) {\n throw new CodedError(\n 'ERR_SPEECH_INPUT_LENGTH',\n 'Speech input text is too long! Limit of input length is: ' + MAX_SPEECH_INPUT_LENGTH\n );\n }\n\n const message = new SpeechSynthesisUtterance();\n\n if (typeof options.rate === 'number') {\n message.rate = options.rate;\n }\n if (typeof options.pitch === 'number') {\n message.pitch = options.pitch;\n }\n if (typeof options.language === 'string') {\n message.lang = options.language;\n }\n if (typeof options.volume === 'number') {\n message.volume = options.volume;\n }\n if ('_voiceIndex' in options && options._voiceIndex != null) {\n const voices = await getVoices();\n message.voice = voices[Math.min(voices.length - 1, Math.max(0, options._voiceIndex))];\n }\n if (typeof options.voice === 'string') {\n const voices = await getVoices();\n message.voice =\n voices[\n Math.max(\n 0,\n voices.findIndex((voice) => voice.voiceURI === options.voice)\n )\n ];\n }\n if (typeof options.onResume === 'function') {\n message.onresume = options.onResume;\n }\n if (typeof options.onMark === 'function') {\n message.onmark = options.onMark;\n }\n if (typeof options.onBoundary === 'function') {\n message.onboundary = options.onBoundary;\n }\n\n message.onstart = (nativeEvent: SpeechSynthesisEvent) => {\n this.emit('Exponent.speakingStarted', { id, nativeEvent });\n };\n message.onend = (nativeEvent: SpeechSynthesisEvent) => {\n this.emit('Exponent.speakingDone', { id, nativeEvent });\n };\n message.onpause = (nativeEvent: SpeechSynthesisEvent) => {\n this.emit('Exponent.speakingStopped', { id, nativeEvent });\n };\n message.onerror = (nativeEvent: SpeechSynthesisErrorEvent) => {\n this.emit('Exponent.speakingError', { id, nativeEvent });\n };\n\n message.text = text;\n\n window.speechSynthesis.speak(message);\n\n return message;\n }\n async getVoices(): Promise<WebVoice[]> {\n const voices = await getVoices();\n return voices.map((voice) => ({\n identifier: voice.voiceURI,\n quality: VoiceQuality.Default,\n isDefault: voice.default,\n language: voice.lang,\n localService: voice.localService,\n name: voice.name,\n voiceURI: voice.voiceURI,\n }));\n }\n async isSpeaking(): Promise<boolean> {\n return window.speechSynthesis.speaking;\n }\n async stop(): Promise<void> {\n return window.speechSynthesis.cancel();\n }\n async pause(): Promise<void> {\n return window.speechSynthesis.pause();\n }\n async resume(): Promise<void> {\n return window.speechSynthesis.resume();\n }\n maxSpeechInputLength = MAX_SPEECH_INPUT_LENGTH;\n}\n\nexport default registerWebModule(ExpoSpeech);\n"]}
|
|
1
|
+
{"version":3,"file":"ExponentSpeech.web.js","sourceRoot":"","sources":["../src/Speech/ExponentSpeech.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAA2B,YAAY,EAAE,MAAM,gBAAgB,CAAC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AO,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;IACzC,CAAC;IACD,KAAK,CAAC,KAAK;QACT,OAAO,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IACD,KAAK,CAAC,MAAM;QACV,OAAO,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;IACzC,CAAC;IACD,oBAAoB,GAAG,uBAAuB,CAAC;CAChD;AAED,eAAe,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import { CodedError, NativeModule, registerWebModule } from 'expo-modules-core';\n\nimport { SpeechOptions, WebVoice, VoiceQuality } from './Speech.types';\n\n//https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/text\nconst MAX_SPEECH_INPUT_LENGTH = 32767;\n\nasync function getVoices(): Promise<SpeechSynthesisVoice[]> {\n return new Promise<SpeechSynthesisVoice[]>((resolve) => {\n const voices = window.speechSynthesis.getVoices();\n\n if (voices.length > 0) {\n resolve(voices);\n return;\n }\n\n // when a page loads it takes some amount of time to populate the voices list\n // see https://stackoverflow.com/a/52005323/4337317\n window.speechSynthesis.onvoiceschanged = function () {\n const voices = window.speechSynthesis.getVoices();\n resolve(voices);\n };\n });\n}\n\ntype ExpoSpeechEvents = {\n 'Exponent.speakingStarted': (params: { id: string; nativeEvent: SpeechSynthesisEvent }) => void;\n 'Exponent.speakingDone': (params: { id: string; nativeEvent: SpeechSynthesisEvent }) => void;\n 'Exponent.speakingStopped': (params: { id: string; nativeEvent: SpeechSynthesisEvent }) => void;\n 'Exponent.speakingError': (params: { id: string; nativeEvent: SpeechSynthesisEvent }) => void;\n};\n\nclass ExpoSpeech extends NativeModule<ExpoSpeechEvents> {\n async speak(id: string, text: string, options: SpeechOptions): Promise<SpeechSynthesisUtterance> {\n if (text.length > MAX_SPEECH_INPUT_LENGTH) {\n throw new CodedError(\n 'ERR_SPEECH_INPUT_LENGTH',\n 'Speech input text is too long! Limit of input length is: ' + MAX_SPEECH_INPUT_LENGTH\n );\n }\n\n const message = new SpeechSynthesisUtterance();\n\n if (typeof options.rate === 'number') {\n message.rate = options.rate;\n }\n if (typeof options.pitch === 'number') {\n message.pitch = options.pitch;\n }\n if (typeof options.language === 'string') {\n message.lang = options.language;\n }\n if (typeof options.volume === 'number') {\n message.volume = options.volume;\n }\n if ('_voiceIndex' in options && options._voiceIndex != null) {\n const voices = await getVoices();\n message.voice = voices[Math.min(voices.length - 1, Math.max(0, options._voiceIndex))];\n }\n if (typeof options.voice === 'string') {\n const voices = await getVoices();\n message.voice =\n voices[\n Math.max(\n 0,\n voices.findIndex((voice) => voice.voiceURI === options.voice)\n )\n ];\n }\n if (typeof options.onResume === 'function') {\n message.onresume = options.onResume;\n }\n if (typeof options.onMark === 'function') {\n message.onmark = options.onMark;\n }\n if (typeof options.onBoundary === 'function') {\n message.onboundary = options.onBoundary;\n }\n\n message.onstart = (nativeEvent: SpeechSynthesisEvent) => {\n this.emit('Exponent.speakingStarted', { id, nativeEvent });\n };\n message.onend = (nativeEvent: SpeechSynthesisEvent) => {\n this.emit('Exponent.speakingDone', { id, nativeEvent });\n };\n message.onpause = (nativeEvent: SpeechSynthesisEvent) => {\n this.emit('Exponent.speakingStopped', { id, nativeEvent });\n };\n message.onerror = (nativeEvent: SpeechSynthesisErrorEvent) => {\n this.emit('Exponent.speakingError', { id, nativeEvent });\n };\n\n message.text = text;\n\n window.speechSynthesis.speak(message);\n\n return message;\n }\n async getVoices(): Promise<WebVoice[]> {\n const voices = await getVoices();\n return voices.map((voice) => ({\n identifier: voice.voiceURI,\n quality: VoiceQuality.Default,\n isDefault: voice.default,\n language: voice.lang,\n localService: voice.localService,\n name: voice.name,\n voiceURI: voice.voiceURI,\n }));\n }\n async isSpeaking(): Promise<boolean> {\n return window.speechSynthesis.speaking;\n }\n async stop(): Promise<void> {\n return window.speechSynthesis.cancel();\n }\n async pause(): Promise<void> {\n return window.speechSynthesis.pause();\n }\n async resume(): Promise<void> {\n return window.speechSynthesis.resume();\n }\n maxSpeechInputLength = MAX_SPEECH_INPUT_LENGTH;\n}\n\nexport default registerWebModule(ExpoSpeech, 'ExpoSpeech');\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.speech",
|
|
6
|
-
"version": "13.1.
|
|
6
|
+
"version": "13.1.3",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.speech-13.1.
|
|
28
|
-
"url": "expo.modules.speech-13.1.
|
|
27
|
+
"name": "expo.modules.speech-13.1.3.aar",
|
|
28
|
+
"url": "expo.modules.speech-13.1.3.aar",
|
|
29
29
|
"size": 30104,
|
|
30
30
|
"sha512": "031d8c3f613ba6be2d4b6909cb263e394de17577dedf9a95eee47dafbaeee9463519e512df381d4c3ef0fb59201285a1c6d6943f7625de598b671d9273f02f7d",
|
|
31
31
|
"sha256": "91dc8a4689b3da6c077ed485fea90daae9372e5bdfd589e1ec3562ff3fe76cb6",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
],
|
|
54
54
|
"files": [
|
|
55
55
|
{
|
|
56
|
-
"name": "expo.modules.speech-13.1.
|
|
57
|
-
"url": "expo.modules.speech-13.1.
|
|
56
|
+
"name": "expo.modules.speech-13.1.3.aar",
|
|
57
|
+
"url": "expo.modules.speech-13.1.3.aar",
|
|
58
58
|
"size": 30104,
|
|
59
59
|
"sha512": "031d8c3f613ba6be2d4b6909cb263e394de17577dedf9a95eee47dafbaeee9463519e512df381d4c3ef0fb59201285a1c6d6943f7625de598b671d9273f02f7d",
|
|
60
60
|
"sha256": "91dc8a4689b3da6c077ed485fea90daae9372e5bdfd589e1ec3562ff3fe76cb6",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
},
|
|
74
74
|
"files": [
|
|
75
75
|
{
|
|
76
|
-
"name": "expo.modules.speech-13.1.
|
|
77
|
-
"url": "expo.modules.speech-13.1.
|
|
76
|
+
"name": "expo.modules.speech-13.1.3-sources.jar",
|
|
77
|
+
"url": "expo.modules.speech-13.1.3-sources.jar",
|
|
78
78
|
"size": 4300,
|
|
79
79
|
"sha512": "da96e3592bc8eadeee376508feca7da36b54f37d55eda3839bff8a57980635601764dee698324c698581cc01f707596e83a96f8f84b706f60446ca2f0922c3a3",
|
|
80
80
|
"sha256": "3a9e571372d42a0a09f3f55e574aa7af6409aea92e4e69de91fc12ae256348f3",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b36c1344fa134613a1864d1abc648517
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d92ed7c16023b2dd496b13c8926eaed136ec64a1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c02dd1fae717a62eaa262c59ae02fb0e7809767c0b77133f391a4b77f5911ea2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e3a82da64415a2d6e43a283e4426eae256e8e29954fdca0ebc21e321fce3cd2cf95c301401c0fe766c801046452c62a84be12cc63e5c7d23da54a8ada62777f2
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.speech</artifactId>
|
|
12
|
-
<version>13.1.
|
|
12
|
+
<version>13.1.3</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.speech</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8b6765d8207cd4f1d703330656786534
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bd600e8ede975b75b5b479cd15e7399cad041b40
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
92c211f201e37ab47d796d8e00f1e9300307ac783a7008ae954a46b805e84576
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5e9968105f4066b70dc896af57ad6143bd361ac158d498cead54331fb494c447bf074c33933d9952b214d33af35d55a5f78309c2dba47aaecf8790e3f0ce0449
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.speech</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>13.1.
|
|
7
|
-
<release>13.1.
|
|
6
|
+
<latest>13.1.3</latest>
|
|
7
|
+
<release>13.1.3</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>13.1.
|
|
9
|
+
<version>13.1.3</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250411190920</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f26f85da0ccd6f22c925b78c47a69b85
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
21b892b48d76bc039af030ab58acae3a0a492d08
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
255bf3434501f1a7d0d18a65b472b8c29556a984d0d74f8cfdda2ef2a5569e5e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
bb75aac4870ba3e421996042a8d92a79c3d38fd6558a90a8e8fd136cfed4edb6b597c8f72bd305c02d63030373a93bc2b9c047b8b733c7668b8c3730e8bf56cd
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-speech",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.3",
|
|
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": "dd2c7150fd75c56505aa6d3f805c14e255649c5d"
|
|
46
46
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
69b1716288ca1173809078ca79f1389b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5bfce655be85f11880cedcb16607c061be725834
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
51f0568b6b8dcffd2dd7e3074aba8a64486e9302c3b2f545a9031560928008b2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
65f5fad111fa0a86cdd5a68ea01239299e3f3e6f69c1c0eb624a3715fd71e7e6f13f8996e320a4060e04c8a6829dd3d7c13643ac6e2516fb46954cc4d912be1e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
835af5d58b2af1efc914dc2d8d102757
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b824700cd75ecc14c25ae7fdbcf046bb55bdf232
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bc8e16f0f8a88b34e5d3611fc959dda85e6a28da9f2ed857f43e34510464f44d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b4542492f54fef54c5d6001956b7e5eb46cad0b416be007f8cdff73f3a21bd88bd432cfa363b17ade59e99cc2b86b4b9616fcacf88531842758b4b9acf890378
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|