expo-speech 14.0.8-canary-20251031-b135dff → 14.1.0-canary-20251118-8f7ee64

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/speech/SpeechModule.kt +8 -1
  4. package/android/src/main/java/expo/modules/speech/SpeechOptions.kt +2 -1
  5. package/build/Speech.types.d.ts +0 -1
  6. package/build/Speech.types.d.ts.map +1 -1
  7. package/build/Speech.types.js.map +1 -1
  8. package/expo-module.config.json +1 -1
  9. package/ios/SpeechModule.swift +4 -0
  10. package/ios/SpeechOptions.swift +2 -0
  11. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64-sources.jar +0 -0
  12. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64-sources.jar.md5 +1 -0
  13. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64-sources.jar.sha1 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64-sources.jar.sha256 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64-sources.jar.sha512 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar +0 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar.md5 +1 -0
  18. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar.sha1 +1 -0
  19. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar.sha256 +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar.sha512 +1 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.module +87 -0
  22. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.module.md5 +1 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.module.sha1 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.module.sha256 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.module.sha512 +1 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.speech/{14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.pom → 14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.pom} +1 -1
  27. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.pom.md5 +1 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.pom.sha1 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.pom.sha256 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.1.0-canary-20251118-8f7ee64/expo.modules.speech-14.1.0-canary-20251118-8f7ee64.pom.sha512 +1 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml +4 -4
  32. package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml.md5 +1 -1
  33. package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml.sha1 +1 -1
  34. package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml.sha256 +1 -1
  35. package/local-maven-repo/host/exp/exponent/expo.modules.speech/maven-metadata.xml.sha512 +1 -1
  36. package/package.json +3 -3
  37. package/src/Speech/Speech.types.ts +0 -1
  38. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff-sources.jar +0 -0
  39. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff-sources.jar.md5 +0 -1
  40. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff-sources.jar.sha1 +0 -1
  41. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff-sources.jar.sha256 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff-sources.jar.sha512 +0 -1
  43. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.aar +0 -0
  44. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.aar.md5 +0 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.aar.sha1 +0 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.aar.sha256 +0 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.aar.sha512 +0 -1
  48. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.module +0 -87
  49. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.module.md5 +0 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.module.sha1 +0 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.module.sha256 +0 -1
  52. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.module.sha512 +0 -1
  53. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.pom.md5 +0 -1
  54. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.pom.sha1 +0 -1
  55. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.pom.sha256 +0 -1
  56. package/local-maven-repo/host/exp/exponent/expo.modules.speech/14.0.8-canary-20251031-b135dff/expo.modules.speech-14.0.8-canary-20251031-b135dff.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  ### 🎉 New features
8
8
 
9
+ - Added support for `volume` option on iOS and Android. ([#40959](https://github.com/expo/expo/pull/40959) by [@barthap](https://github.com/barthap))
10
+
9
11
  ### 🐛 Bug fixes
10
12
 
11
13
  ### 💡 Others
@@ -4,12 +4,12 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '14.0.8-canary-20251031-b135dff'
7
+ version = '14.1.0-canary-20251118-8f7ee64'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.speech"
11
11
  defaultConfig {
12
12
  versionCode 18
13
- versionName "14.0.8-canary-20251031-b135dff"
13
+ versionName "14.1.0-canary-20251118-8f7ee64"
14
14
  }
15
15
  }
@@ -123,10 +123,17 @@ class SpeechModule : Module() {
123
123
  ?.let(textToSpeech::setVoice)
124
124
  }
125
125
 
126
+ val params = Bundle().apply {
127
+ options.volume?.let {
128
+ val volume = it.coerceAtLeast(0.0f).coerceAtMost(1.0f)
129
+ putFloat(TextToSpeech.Engine.KEY_PARAM_VOLUME, volume)
130
+ }
131
+ }
132
+
126
133
  textToSpeech.speak(
127
134
  text,
128
135
  TextToSpeech.QUEUE_ADD,
129
- null,
136
+ params,
130
137
  id
131
138
  )
132
139
  }
@@ -7,5 +7,6 @@ data class SpeechOptions(
7
7
  @Field val language: String?,
8
8
  @Field val pitch: Float?,
9
9
  @Field val rate: Float?,
10
- @Field val voice: String?
10
+ @Field val voice: String?,
11
+ @Field val volume: Float?
11
12
  ) : Record
@@ -51,7 +51,6 @@ export type SpeechOptions = {
51
51
  * Volume of the voice to speak `text`. A number between `0.0` (muted) and `1.0` (max volume)
52
52
  *
53
53
  * @default 1.0
54
- * @platform web
55
54
  */
56
55
  volume?: number;
57
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Speech.types.d.ts","sourceRoot":"","sources":["../src/Speech/Speech.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,wBAAwB,EAAE,EAAE,EAAE,oBAAoB,KAAK,GAAG,CAAC;AACpG,MAAM,MAAM,mBAAmB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,EAAE,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAG5E,MAAM,MAAM,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;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;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;;;;;OAKG;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;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,2BAA2B,GAAG,mBAAmB,GAAG,IAAI,CAAC;IACtE,MAAM,CAAC,EAAE,mBAAmB,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AAuEA,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;\nexport type NativeBoundaryEvent = { charIndex: number; charLength: number };\n\n/**\n * Native-only callback with parameters related to the word about to be uttered.\n * @platform ios\n * @platform android\n */\nexport type NativeBoundaryEventCallback = (ev: NativeBoundaryEvent) => void;\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 * If you set this value to `false`, the system creates a separate audio session to automatically manage speech, interruptions, and mixing and ducking the speech with other audio sources.\n * @platform ios\n */\n useApplicationAudioSession?: boolean;\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 * @platform ios\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\n /**\n * A callback that is invoked when the spoken utterance reaches a word.\n */\n onBoundary?: NativeBoundaryEventCallback | 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"]}
1
+ {"version":3,"file":"Speech.types.js","sourceRoot":"","sources":["../src/Speech/Speech.types.ts"],"names":[],"mappings":"AAsEA,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;\nexport type NativeBoundaryEvent = { charIndex: number; charLength: number };\n\n/**\n * Native-only callback with parameters related to the word about to be uttered.\n * @platform ios\n * @platform android\n */\nexport type NativeBoundaryEventCallback = (ev: NativeBoundaryEvent) => void;\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 * If you set this value to `false`, the system creates a separate audio session to automatically manage speech, interruptions, and mixing and ducking the speech with other audio sources.\n * @platform ios\n */\n useApplicationAudioSession?: boolean;\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 * @platform ios\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 */\n volume?: number;\n /**\n * Voice identifier.\n */\n voice?: string;\n _voiceIndex?: number;\n\n /**\n * A callback that is invoked when the spoken utterance reaches a word.\n */\n onBoundary?: NativeBoundaryEventCallback | 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"]}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.speech",
11
- "version": "14.0.8-canary-20251031-b135dff",
11
+ "version": "14.1.0-canary-20251118-8f7ee64",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -49,6 +49,10 @@ public final class SpeechModule: Module, SpeechResultHadler {
49
49
  utterance.rate = Float(rate) * AVSpeechUtteranceDefaultSpeechRate
50
50
  }
51
51
 
52
+ if let volume = options.volume {
53
+ utterance.volume = min(max(volume, 0.0), 1.0);
54
+ }
55
+
52
56
  if let useApplicationAudioSession = options.useApplicationAudioSession {
53
57
  synthesizer.usesApplicationAudioSession = useApplicationAudioSession
54
58
  }
@@ -11,6 +11,8 @@ struct SpeechOptions: Record {
11
11
  var voice: String?
12
12
  @Field
13
13
  var useApplicationAudioSession: Bool?
14
+ @Field
15
+ var volume: Float?
14
16
  }
15
17
 
16
18
  struct VoiceInfo: Record {
@@ -0,0 +1 @@
1
+ 44a6a7215047c40f0a30de701912161c43126fbcc3c6e419d1fdf1e6a83a488201e0d15c082e3b2a6c82b1ce62b89bf69106c811a39b1bafa2b346e00dab2d2a
@@ -0,0 +1 @@
1
+ 4c6d0220770d448a69bdb730221f6819cf9420d754bc876c928188066a25073680d9ca70f6f92f97609119129bf68741eb7e902fe5bd8c575f559a95113c0174
@@ -0,0 +1,87 @@
1
+ {
2
+ "formatVersion": "1.1",
3
+ "component": {
4
+ "group": "host.exp.exponent",
5
+ "module": "expo.modules.speech",
6
+ "version": "14.1.0-canary-20251118-8f7ee64",
7
+ "attributes": {
8
+ "org.gradle.status": "release"
9
+ }
10
+ },
11
+ "createdBy": {
12
+ "gradle": {
13
+ "version": "9.0.0"
14
+ }
15
+ },
16
+ "variants": [
17
+ {
18
+ "name": "releaseVariantReleaseApiPublication",
19
+ "attributes": {
20
+ "org.gradle.category": "library",
21
+ "org.gradle.dependency.bundling": "external",
22
+ "org.gradle.libraryelements": "aar",
23
+ "org.gradle.usage": "java-api"
24
+ },
25
+ "files": [
26
+ {
27
+ "name": "expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar",
28
+ "url": "expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar",
29
+ "size": 34833,
30
+ "sha512": "4c6d0220770d448a69bdb730221f6819cf9420d754bc876c928188066a25073680d9ca70f6f92f97609119129bf68741eb7e902fe5bd8c575f559a95113c0174",
31
+ "sha256": "d8595d78a31541ddf28c713ff2d8c794bd5fe3c835778581750777ed814d8d65",
32
+ "sha1": "ee8222357ff4bfe580d9c1d1bd826b1312127bee",
33
+ "md5": "fde5d6a90709269e0d9808dd88e2e6fb"
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "name": "releaseVariantReleaseRuntimePublication",
39
+ "attributes": {
40
+ "org.gradle.category": "library",
41
+ "org.gradle.dependency.bundling": "external",
42
+ "org.gradle.libraryelements": "aar",
43
+ "org.gradle.usage": "java-runtime"
44
+ },
45
+ "dependencies": [
46
+ {
47
+ "group": "org.jetbrains.kotlin",
48
+ "module": "kotlin-stdlib-jdk7",
49
+ "version": {
50
+ "requires": "2.1.20"
51
+ }
52
+ }
53
+ ],
54
+ "files": [
55
+ {
56
+ "name": "expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar",
57
+ "url": "expo.modules.speech-14.1.0-canary-20251118-8f7ee64.aar",
58
+ "size": 34833,
59
+ "sha512": "4c6d0220770d448a69bdb730221f6819cf9420d754bc876c928188066a25073680d9ca70f6f92f97609119129bf68741eb7e902fe5bd8c575f559a95113c0174",
60
+ "sha256": "d8595d78a31541ddf28c713ff2d8c794bd5fe3c835778581750777ed814d8d65",
61
+ "sha1": "ee8222357ff4bfe580d9c1d1bd826b1312127bee",
62
+ "md5": "fde5d6a90709269e0d9808dd88e2e6fb"
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "releaseVariantReleaseSourcePublication",
68
+ "attributes": {
69
+ "org.gradle.category": "documentation",
70
+ "org.gradle.dependency.bundling": "external",
71
+ "org.gradle.docstype": "sources",
72
+ "org.gradle.usage": "java-runtime"
73
+ },
74
+ "files": [
75
+ {
76
+ "name": "expo.modules.speech-14.1.0-canary-20251118-8f7ee64-sources.jar",
77
+ "url": "expo.modules.speech-14.1.0-canary-20251118-8f7ee64-sources.jar",
78
+ "size": 4543,
79
+ "sha512": "44a6a7215047c40f0a30de701912161c43126fbcc3c6e419d1fdf1e6a83a488201e0d15c082e3b2a6c82b1ce62b89bf69106c811a39b1bafa2b346e00dab2d2a",
80
+ "sha256": "ec0f0c19b07e9587dfb2d6fc732438bbe7374b5a70be7c229fcc25e067388318",
81
+ "sha1": "b0283511f6f07f4c608ebb7b6d4c5914a9d6c078",
82
+ "md5": "2c49f843d62115e6b0d545e4fb8a3334"
83
+ }
84
+ ]
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1 @@
1
+ 0f83085023ef3d8be02d4e8b95ca61d06e4d58429f79d9d2308a2b0fbbdeeccc89493d9eeb6cfd6e6c2c46a91d32c371a8237b244e86781b802d8ce6006b16a3
@@ -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>14.0.8-canary-20251031-b135dff</version>
12
+ <version>14.1.0-canary-20251118-8f7ee64</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
+ 25caa80eb316376d8c48fd752e245205376f969cdb643a8eae82e490b1196a0a2ddfc5cf7ce30b12f5f2aa926c545f1a514465a29b8296c292f5fb61e0cde174
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.speech</artifactId>
5
5
  <versioning>
6
- <latest>14.0.8-canary-20251031-b135dff</latest>
7
- <release>14.0.8-canary-20251031-b135dff</release>
6
+ <latest>14.1.0-canary-20251118-8f7ee64</latest>
7
+ <release>14.1.0-canary-20251118-8f7ee64</release>
8
8
  <versions>
9
- <version>14.0.8-canary-20251031-b135dff</version>
9
+ <version>14.1.0-canary-20251118-8f7ee64</version>
10
10
  </versions>
11
- <lastUpdated>20251031073853</lastUpdated>
11
+ <lastUpdated>20251118194238</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- c6dcda4b8ecfe392aee6294f667ede3c
1
+ 5a297aae527e1ff5d6255c44bc36e759
@@ -1 +1 @@
1
- a4b969f5b109eb2d8439a6a9431b4083626a5af1
1
+ 40f6cf2f2854a70f6245ca8bf74fd94eb0ac2db2
@@ -1 +1 @@
1
- 14b9f59d954201ececb4a43b168b1f91e93e8f6b8e8b083bd66f1fa679d07049
1
+ 7c01e4b65f90949081822df94a698c584ec88a30bd0c316f875c324f170ea56c
@@ -1 +1 @@
1
- b9cd34abaefe6810986a10b85557e5e53505a6e4d34d7bd758553b91909101ea993447bcfe6c3a0458d52486844a491e2d736fcaf35fa021997521de81834366
1
+ ef715ca68b0e33e50c7a0447d610c5573eb1a1dae069e527a0e1adae3ae497305bdc5f65a5879c7e3114ec8358487066a49a84d56d6294a3012a443d81b7f561
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-speech",
3
- "version": "14.0.8-canary-20251031-b135dff",
3
+ "version": "14.1.0-canary-20251118-8f7ee64",
4
4
  "description": "Provides text-to-speech functionality.",
5
5
  "main": "build/Speech.js",
6
6
  "types": "build/Speech.d.ts",
@@ -37,9 +37,9 @@
37
37
  },
38
38
  "dependencies": {},
39
39
  "devDependencies": {
40
- "expo-module-scripts": "5.0.8-canary-20251031-b135dff"
40
+ "expo-module-scripts": "5.1.0-canary-20251118-8f7ee64"
41
41
  },
42
42
  "peerDependencies": {
43
- "expo": "55.0.0-canary-20251031-b135dff"
43
+ "expo": "55.0.0-canary-20251118-8f7ee64"
44
44
  }
45
45
  }
@@ -51,7 +51,6 @@ export type SpeechOptions = {
51
51
  * Volume of the voice to speak `text`. A number between `0.0` (muted) and `1.0` (max volume)
52
52
  *
53
53
  * @default 1.0
54
- * @platform web
55
54
  */
56
55
  volume?: number;
57
56
  /**
@@ -1 +0,0 @@
1
- 06471f6f4ff29c164948694e6dd39bd45ead016e9dd8b549287885c3460394a73e0f89e0bf987702f93e074b9ccab014601ff39b746dca39d5ca977793d51f24
@@ -1 +0,0 @@
1
- d0bb845820f2a7736adc6ec3baeec6930d32e322abf6f31f689ba43e94a3aa311a1c9e525bf7a8fa557a81443b31c660aaf4eaece2eceb3116911e4cf26566c1
@@ -1,87 +0,0 @@
1
- {
2
- "formatVersion": "1.1",
3
- "component": {
4
- "group": "host.exp.exponent",
5
- "module": "expo.modules.speech",
6
- "version": "14.0.8-canary-20251031-b135dff",
7
- "attributes": {
8
- "org.gradle.status": "release"
9
- }
10
- },
11
- "createdBy": {
12
- "gradle": {
13
- "version": "9.0.0"
14
- }
15
- },
16
- "variants": [
17
- {
18
- "name": "releaseVariantReleaseApiPublication",
19
- "attributes": {
20
- "org.gradle.category": "library",
21
- "org.gradle.dependency.bundling": "external",
22
- "org.gradle.libraryelements": "aar",
23
- "org.gradle.usage": "java-api"
24
- },
25
- "files": [
26
- {
27
- "name": "expo.modules.speech-14.0.8-canary-20251031-b135dff.aar",
28
- "url": "expo.modules.speech-14.0.8-canary-20251031-b135dff.aar",
29
- "size": 34424,
30
- "sha512": "d0bb845820f2a7736adc6ec3baeec6930d32e322abf6f31f689ba43e94a3aa311a1c9e525bf7a8fa557a81443b31c660aaf4eaece2eceb3116911e4cf26566c1",
31
- "sha256": "37b31aff898b4360f7499bd131e9e4e4776b932961cc07c9c911f55bf0e4b810",
32
- "sha1": "a3439d71bafcba9c424b8304ade35d3185ab967b",
33
- "md5": "3c46749a2cbe441d0151e85d1c85eb39"
34
- }
35
- ]
36
- },
37
- {
38
- "name": "releaseVariantReleaseRuntimePublication",
39
- "attributes": {
40
- "org.gradle.category": "library",
41
- "org.gradle.dependency.bundling": "external",
42
- "org.gradle.libraryelements": "aar",
43
- "org.gradle.usage": "java-runtime"
44
- },
45
- "dependencies": [
46
- {
47
- "group": "org.jetbrains.kotlin",
48
- "module": "kotlin-stdlib-jdk7",
49
- "version": {
50
- "requires": "2.1.20"
51
- }
52
- }
53
- ],
54
- "files": [
55
- {
56
- "name": "expo.modules.speech-14.0.8-canary-20251031-b135dff.aar",
57
- "url": "expo.modules.speech-14.0.8-canary-20251031-b135dff.aar",
58
- "size": 34424,
59
- "sha512": "d0bb845820f2a7736adc6ec3baeec6930d32e322abf6f31f689ba43e94a3aa311a1c9e525bf7a8fa557a81443b31c660aaf4eaece2eceb3116911e4cf26566c1",
60
- "sha256": "37b31aff898b4360f7499bd131e9e4e4776b932961cc07c9c911f55bf0e4b810",
61
- "sha1": "a3439d71bafcba9c424b8304ade35d3185ab967b",
62
- "md5": "3c46749a2cbe441d0151e85d1c85eb39"
63
- }
64
- ]
65
- },
66
- {
67
- "name": "releaseVariantReleaseSourcePublication",
68
- "attributes": {
69
- "org.gradle.category": "documentation",
70
- "org.gradle.dependency.bundling": "external",
71
- "org.gradle.docstype": "sources",
72
- "org.gradle.usage": "java-runtime"
73
- },
74
- "files": [
75
- {
76
- "name": "expo.modules.speech-14.0.8-canary-20251031-b135dff-sources.jar",
77
- "url": "expo.modules.speech-14.0.8-canary-20251031-b135dff-sources.jar",
78
- "size": 4455,
79
- "sha512": "06471f6f4ff29c164948694e6dd39bd45ead016e9dd8b549287885c3460394a73e0f89e0bf987702f93e074b9ccab014601ff39b746dca39d5ca977793d51f24",
80
- "sha256": "4f49cc60b8d7ae88277a6427744d59ac29cca851c42089e783a8e08d276d4459",
81
- "sha1": "77951715917e77c3996ad7be6ceb4df5e176b02a",
82
- "md5": "6d3d3cb9bf8c274ebc7b3a2874106a93"
83
- }
84
- ]
85
- }
86
- ]
87
- }
@@ -1 +0,0 @@
1
- d68b335014dfc270d7436f27d27d9f07658f1f13b8fed2c47eee6b4ae2fcc9a74d8dd4e264f78d4d5148111faf98bc6665feffa72ad763446a0ce9cbd1a6838e
@@ -1 +0,0 @@
1
- cc190a6a52a8a01fc198fc42b6555e2123748199ee8f6217f3b078bd5097810230b4dac85f9e79f7353f005afa4fc481671166c933744d190f333d860dc425e5