telnyx 5.58.0 → 5.59.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.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +8 -13
  5. data/lib/telnyx/models/ai/assistants/{tag_remove_params.rb → tag_create_params.rb} +2 -2
  6. data/lib/telnyx/models/ai/assistants/{tag_remove_response.rb → tag_create_response.rb} +2 -2
  7. data/lib/telnyx/models/ai/assistants/{tag_add_params.rb → tag_delete_params.rb} +2 -2
  8. data/lib/telnyx/models/ai/assistants/{tag_add_response.rb → tag_delete_response.rb} +2 -2
  9. data/lib/telnyx/models/stream_client_event.rb +42 -0
  10. data/lib/telnyx/models/stream_server_event.rb +200 -0
  11. data/lib/telnyx/models/text_to_speech_generate_params.rb +56 -21
  12. data/lib/telnyx/models/text_to_speech_list_voices_params.rb +0 -1
  13. data/lib/telnyx/models/text_to_speech_stream_params.rb +1 -99
  14. data/lib/telnyx/models/traffic_policy_profile_create_params.rb +76 -0
  15. data/lib/telnyx/models/traffic_policy_profile_create_response.rb +107 -0
  16. data/lib/telnyx/models/{whatsapp_message_template_delete_params.rb → traffic_policy_profile_delete_params.rb} +2 -2
  17. data/lib/telnyx/models/traffic_policy_profile_delete_response.rb +28 -0
  18. data/lib/telnyx/models/traffic_policy_profile_list_params.rb +84 -0
  19. data/lib/telnyx/models/traffic_policy_profile_list_response.rb +96 -0
  20. data/lib/telnyx/models/traffic_policy_profile_list_services_params.rb +46 -0
  21. data/lib/telnyx/models/traffic_policy_profile_list_services_response.rb +42 -0
  22. data/lib/telnyx/models/{whatsapp_message_template_retrieve_params.rb → traffic_policy_profile_retrieve_params.rb} +2 -2
  23. data/lib/telnyx/models/traffic_policy_profile_retrieve_response.rb +107 -0
  24. data/lib/telnyx/models/traffic_policy_profile_update_params.rb +84 -0
  25. data/lib/telnyx/models/traffic_policy_profile_update_response.rb +107 -0
  26. data/lib/telnyx/models/{voice_clone_create_params.rb → voice_clone_create_from_design_params.rb} +5 -5
  27. data/lib/telnyx/models/voice_clone_create_from_design_response.rb +137 -0
  28. data/lib/telnyx/models/voice_clone_create_from_upload_response.rb +121 -3
  29. data/lib/telnyx/models/{voice_clone_data.rb → voice_clone_list_response.rb} +10 -10
  30. data/lib/telnyx/models/voice_clone_update_response.rb +119 -3
  31. data/lib/telnyx/models/voice_design_create_response.rb +101 -3
  32. data/lib/telnyx/models/voice_design_retrieve_response.rb +101 -3
  33. data/lib/telnyx/models/{voice_design_rename_params.rb → voice_design_update_params.rb} +2 -2
  34. data/lib/telnyx/models/{voice_design_rename_response.rb → voice_design_update_response.rb} +10 -10
  35. data/lib/telnyx/models/whatsapp/business_accounts/{phone_number_initialize_verification_params.rb → phone_number_create_verification_params.rb} +5 -5
  36. data/lib/telnyx/models/whatsapp/{template_create_params.rb → message_template_create_params.rb} +5 -5
  37. data/lib/telnyx/models/whatsapp/{template_create_response.rb → message_template_create_response.rb} +2 -2
  38. data/lib/telnyx/models/whatsapp/message_template_delete_params.rb +22 -0
  39. data/lib/telnyx/models/whatsapp/{template_list_params.rb → message_template_list_params.rb} +5 -5
  40. data/lib/telnyx/models/whatsapp/message_template_retrieve_params.rb +22 -0
  41. data/lib/telnyx/models/whatsapp/message_template_retrieve_response.rb +18 -0
  42. data/lib/telnyx/models/whatsapp/message_template_update_params.rb +46 -0
  43. data/lib/telnyx/models/whatsapp/message_template_update_response.rb +18 -0
  44. data/lib/telnyx/models/whatsapp/phone_numbers/profile/photo_upload_response.rb +99 -3
  45. data/lib/telnyx/models/whatsapp/phone_numbers/profile_retrieve_response.rb +99 -3
  46. data/lib/telnyx/models/whatsapp/phone_numbers/profile_update_response.rb +99 -3
  47. data/lib/telnyx/models/x402/{credit_account_create_quote_params.rb → credit_account_create_payment_quote_params.rb} +2 -2
  48. data/lib/telnyx/models/x402/{credit_account_create_quote_response.rb → credit_account_create_payment_quote_response.rb} +33 -32
  49. data/lib/telnyx/models/x402/{credit_account_settle_params.rb → credit_account_settle_payment_params.rb} +10 -10
  50. data/lib/telnyx/models/x402/{credit_account_settle_response.rb → credit_account_settle_payment_response.rb} +15 -14
  51. data/lib/telnyx/models.rb +16 -16
  52. data/lib/telnyx/resources/ai/assistants/tags.rb +28 -28
  53. data/lib/telnyx/resources/text_to_speech.rb +10 -65
  54. data/lib/telnyx/resources/traffic_policy_profiles.rb +194 -0
  55. data/lib/telnyx/resources/voice_clones.rb +31 -31
  56. data/lib/telnyx/resources/voice_designs.rb +24 -24
  57. data/lib/telnyx/resources/whatsapp/business_accounts/phone_numbers.rb +5 -5
  58. data/lib/telnyx/resources/whatsapp/message_templates.rb +149 -0
  59. data/lib/telnyx/resources/whatsapp/phone_numbers/profile/models.rb +20 -0
  60. data/lib/telnyx/resources/whatsapp/phone_numbers/profile.rb +4 -0
  61. data/lib/telnyx/resources/whatsapp.rb +3 -3
  62. data/lib/telnyx/resources/x402/credit_account.rb +16 -16
  63. data/lib/telnyx/version.rb +1 -1
  64. data/lib/telnyx.rb +39 -28
  65. data/rbi/telnyx/client.rbi +6 -10
  66. data/rbi/telnyx/models/ai/assistants/{tag_remove_params.rbi → tag_create_params.rbi} +2 -2
  67. data/rbi/telnyx/models/ai/assistants/{tag_remove_response.rbi → tag_create_response.rbi} +2 -2
  68. data/rbi/telnyx/models/ai/assistants/{tag_add_params.rbi → tag_delete_params.rbi} +2 -2
  69. data/rbi/telnyx/models/ai/assistants/{tag_add_response.rbi → tag_delete_response.rbi} +2 -2
  70. data/rbi/telnyx/models/stream_client_event.rbi +70 -0
  71. data/rbi/telnyx/models/stream_server_event.rbi +411 -0
  72. data/rbi/telnyx/models/text_to_speech_generate_params.rbi +122 -32
  73. data/rbi/telnyx/models/text_to_speech_list_voices_params.rbi +0 -5
  74. data/rbi/telnyx/models/text_to_speech_stream_params.rbi +4 -213
  75. data/rbi/telnyx/models/traffic_policy_profile_create_params.rbi +170 -0
  76. data/rbi/telnyx/models/traffic_policy_profile_create_response.rbi +219 -0
  77. data/rbi/telnyx/models/{whatsapp_message_template_delete_params.rbi → traffic_policy_profile_delete_params.rbi} +2 -2
  78. data/rbi/telnyx/models/traffic_policy_profile_delete_response.rbi +73 -0
  79. data/rbi/telnyx/models/traffic_policy_profile_list_params.rbi +194 -0
  80. data/rbi/telnyx/models/traffic_policy_profile_list_response.rbi +178 -0
  81. data/rbi/telnyx/models/traffic_policy_profile_list_services_params.rbi +82 -0
  82. data/rbi/telnyx/models/traffic_policy_profile_list_services_response.rbi +69 -0
  83. data/rbi/telnyx/models/{whatsapp_message_template_retrieve_params.rbi → traffic_policy_profile_retrieve_params.rbi} +2 -2
  84. data/rbi/telnyx/models/traffic_policy_profile_retrieve_response.rbi +221 -0
  85. data/rbi/telnyx/models/traffic_policy_profile_update_params.rbi +188 -0
  86. data/rbi/telnyx/models/traffic_policy_profile_update_response.rbi +219 -0
  87. data/rbi/telnyx/models/{voice_clone_create_params.rbi → voice_clone_create_from_design_params.rbi} +28 -10
  88. data/rbi/telnyx/models/voice_clone_create_from_design_response.rbi +270 -0
  89. data/rbi/telnyx/models/voice_clone_create_from_upload_response.rbi +238 -4
  90. data/rbi/telnyx/models/{voice_clone_data.rbi → voice_clone_list_response.rbi} +62 -17
  91. data/rbi/telnyx/models/voice_clone_update_response.rbi +234 -4
  92. data/rbi/telnyx/models/voice_design_create_response.rbi +197 -4
  93. data/rbi/telnyx/models/voice_design_retrieve_response.rbi +197 -4
  94. data/rbi/telnyx/models/{voice_design_rename_params.rbi → voice_design_update_params.rbi} +2 -2
  95. data/rbi/telnyx/models/{voice_design_rename_response.rbi → voice_design_update_response.rbi} +14 -14
  96. data/rbi/telnyx/models/whatsapp/business_accounts/{phone_number_initialize_verification_params.rbi → phone_number_create_verification_params.rbi} +10 -10
  97. data/rbi/telnyx/models/whatsapp/{template_create_params.rbi → message_template_create_params.rbi} +15 -10
  98. data/rbi/telnyx/models/whatsapp/{template_create_response.rbi → message_template_create_response.rbi} +2 -2
  99. data/rbi/telnyx/models/whatsapp/message_template_delete_params.rbi +40 -0
  100. data/rbi/telnyx/models/whatsapp/{template_list_params.rbi → message_template_list_params.rbi} +11 -11
  101. data/rbi/telnyx/models/whatsapp/message_template_retrieve_params.rbi +40 -0
  102. data/rbi/telnyx/models/whatsapp/message_template_retrieve_response.rbi +35 -0
  103. data/rbi/telnyx/models/whatsapp/message_template_update_params.rbi +111 -0
  104. data/rbi/telnyx/models/whatsapp/message_template_update_response.rbi +35 -0
  105. data/rbi/telnyx/models/whatsapp/phone_numbers/profile/photo_upload_response.rbi +155 -4
  106. data/rbi/telnyx/models/whatsapp/phone_numbers/profile_retrieve_response.rbi +157 -4
  107. data/rbi/telnyx/models/whatsapp/phone_numbers/profile_update_response.rbi +157 -4
  108. data/rbi/telnyx/models/x402/{credit_account_create_quote_params.rbi → credit_account_create_payment_quote_params.rbi} +2 -2
  109. data/rbi/telnyx/models/x402/{credit_account_create_quote_response.rbi → credit_account_create_payment_quote_response.rbi} +43 -42
  110. data/rbi/telnyx/models/x402/{credit_account_settle_params.rbi → credit_account_settle_payment_params.rbi} +14 -14
  111. data/rbi/telnyx/models/x402/{credit_account_settle_response.rbi → credit_account_settle_payment_response.rbi} +26 -21
  112. data/rbi/telnyx/models.rbi +23 -19
  113. data/rbi/telnyx/resources/ai/assistants/tags.rbi +13 -13
  114. data/rbi/telnyx/resources/text_to_speech.rbi +15 -70
  115. data/rbi/telnyx/resources/traffic_policy_profiles.rbi +161 -0
  116. data/rbi/telnyx/resources/voice_clones.rbi +27 -25
  117. data/rbi/telnyx/resources/voice_designs.rbi +17 -17
  118. data/rbi/telnyx/resources/whatsapp/business_accounts/phone_numbers.rbi +2 -2
  119. data/rbi/telnyx/resources/whatsapp/{templates.rbi → message_templates.rbi} +51 -4
  120. data/rbi/telnyx/resources/whatsapp/phone_numbers/profile/models.rbi +18 -0
  121. data/rbi/telnyx/resources/whatsapp/phone_numbers/profile.rbi +5 -0
  122. data/rbi/telnyx/resources/whatsapp.rbi +2 -2
  123. data/rbi/telnyx/resources/x402/credit_account.rbi +10 -8
  124. data/sig/telnyx/client.rbs +3 -5
  125. data/sig/telnyx/models/ai/assistants/{tag_remove_params.rbs → tag_create_params.rbs} +2 -2
  126. data/sig/telnyx/models/ai/assistants/{tag_remove_response.rbs → tag_create_response.rbs} +2 -2
  127. data/sig/telnyx/models/ai/assistants/{tag_add_params.rbs → tag_delete_params.rbs} +2 -2
  128. data/sig/telnyx/models/ai/assistants/{tag_add_response.rbs → tag_delete_response.rbs} +2 -2
  129. data/sig/telnyx/models/stream_client_event.rbs +30 -0
  130. data/sig/telnyx/models/stream_server_event.rbs +180 -0
  131. data/sig/telnyx/models/text_to_speech_generate_params.rbs +37 -19
  132. data/sig/telnyx/models/text_to_speech_list_voices_params.rbs +1 -9
  133. data/sig/telnyx/models/text_to_speech_stream_params.rbs +3 -100
  134. data/sig/telnyx/models/traffic_policy_profile_create_params.rbs +78 -0
  135. data/sig/telnyx/models/traffic_policy_profile_create_response.rbs +109 -0
  136. data/sig/telnyx/models/{whatsapp_message_template_delete_params.rbs → traffic_policy_profile_delete_params.rbs} +2 -2
  137. data/sig/telnyx/models/traffic_policy_profile_delete_response.rbs +34 -0
  138. data/sig/telnyx/models/traffic_policy_profile_list_params.rbs +85 -0
  139. data/sig/telnyx/models/traffic_policy_profile_list_response.rbs +90 -0
  140. data/sig/telnyx/models/traffic_policy_profile_list_services_params.rbs +49 -0
  141. data/sig/telnyx/models/traffic_policy_profile_list_services_response.rbs +38 -0
  142. data/sig/telnyx/models/{whatsapp_message_template_retrieve_params.rbs → traffic_policy_profile_retrieve_params.rbs} +2 -2
  143. data/sig/telnyx/models/traffic_policy_profile_retrieve_response.rbs +109 -0
  144. data/sig/telnyx/models/traffic_policy_profile_update_params.rbs +84 -0
  145. data/sig/telnyx/models/traffic_policy_profile_update_response.rbs +109 -0
  146. data/sig/telnyx/models/{voice_clone_create_params.rbs → voice_clone_create_from_design_params.rbs} +7 -7
  147. data/sig/telnyx/models/voice_clone_create_from_design_response.rbs +118 -0
  148. data/sig/telnyx/models/voice_clone_create_from_upload_response.rbs +107 -5
  149. data/sig/telnyx/models/{voice_clone_data.rbs → voice_clone_list_response.rbs} +14 -14
  150. data/sig/telnyx/models/voice_clone_update_response.rbs +106 -5
  151. data/sig/telnyx/models/voice_design_create_response.rbs +104 -5
  152. data/sig/telnyx/models/voice_design_retrieve_response.rbs +106 -5
  153. data/sig/telnyx/models/{voice_design_rename_params.rbs → voice_design_update_params.rbs} +2 -2
  154. data/sig/telnyx/models/{voice_design_rename_response.rbs → voice_design_update_response.rbs} +15 -15
  155. data/sig/telnyx/models/whatsapp/business_accounts/{phone_number_initialize_verification_params.rbs → phone_number_create_verification_params.rbs} +9 -9
  156. data/sig/telnyx/models/whatsapp/{template_create_params.rbs → message_template_create_params.rbs} +7 -7
  157. data/sig/telnyx/models/whatsapp/{template_create_response.rbs → message_template_create_response.rbs} +3 -2
  158. data/sig/telnyx/models/whatsapp/message_template_delete_params.rbs +22 -0
  159. data/sig/telnyx/models/whatsapp/{template_list_params.rbs → message_template_list_params.rbs} +9 -9
  160. data/sig/telnyx/models/whatsapp/message_template_retrieve_params.rbs +22 -0
  161. data/sig/telnyx/models/whatsapp/message_template_retrieve_response.rbs +20 -0
  162. data/sig/telnyx/models/whatsapp/message_template_update_params.rbs +58 -0
  163. data/sig/telnyx/models/whatsapp/message_template_update_response.rbs +20 -0
  164. data/sig/telnyx/models/whatsapp/phone_numbers/profile/photo_upload_response.rbs +111 -6
  165. data/sig/telnyx/models/whatsapp/phone_numbers/profile_retrieve_response.rbs +111 -6
  166. data/sig/telnyx/models/whatsapp/phone_numbers/profile_update_response.rbs +111 -6
  167. data/sig/telnyx/models/x402/{credit_account_create_quote_params.rbs → credit_account_create_payment_quote_params.rbs} +2 -2
  168. data/sig/telnyx/models/x402/{credit_account_create_quote_response.rbs → credit_account_create_payment_quote_response.rbs} +49 -47
  169. data/sig/telnyx/models/x402/credit_account_settle_payment_params.rbs +42 -0
  170. data/sig/telnyx/models/x402/{credit_account_settle_response.rbs → credit_account_settle_payment_response.rbs} +22 -22
  171. data/sig/telnyx/models.rbs +16 -16
  172. data/sig/telnyx/resources/ai/assistants/tags.rbs +8 -8
  173. data/sig/telnyx/resources/text_to_speech.rbs +0 -12
  174. data/sig/telnyx/resources/traffic_policy_profiles.rbs +53 -0
  175. data/sig/telnyx/resources/voice_clones.rbs +9 -9
  176. data/sig/telnyx/resources/voice_designs.rbs +6 -6
  177. data/sig/telnyx/resources/whatsapp/business_accounts/phone_numbers.rbs +2 -2
  178. data/sig/telnyx/resources/whatsapp/message_templates.rbs +42 -0
  179. data/sig/telnyx/resources/whatsapp/phone_numbers/profile/models.rbs +13 -0
  180. data/sig/telnyx/resources/whatsapp/phone_numbers/profile.rbs +2 -0
  181. data/sig/telnyx/resources/whatsapp.rbs +1 -1
  182. data/sig/telnyx/resources/x402/credit_account.rbs +6 -6
  183. metadata +119 -86
  184. data/lib/telnyx/models/speech_to_text_transcribe_params.rb +0 -140
  185. data/lib/telnyx/models/voice_clone_create_response.rb +0 -19
  186. data/lib/telnyx/models/voice_design_data.rb +0 -102
  187. data/lib/telnyx/models/whatsapp/phone_numbers/whatsapp_profile_data.rb +0 -104
  188. data/lib/telnyx/models/whatsapp_message_template_retrieve_response.rb +0 -16
  189. data/lib/telnyx/models/whatsapp_message_template_update_params.rb +0 -44
  190. data/lib/telnyx/models/whatsapp_message_template_update_response.rb +0 -16
  191. data/lib/telnyx/resources/speech_to_text.rb +0 -71
  192. data/lib/telnyx/resources/whatsapp/templates.rb +0 -83
  193. data/lib/telnyx/resources/whatsapp_message_templates.rb +0 -81
  194. data/rbi/telnyx/models/speech_to_text_transcribe_params.rbi +0 -318
  195. data/rbi/telnyx/models/voice_clone_create_response.rbi +0 -36
  196. data/rbi/telnyx/models/voice_design_data.rbi +0 -167
  197. data/rbi/telnyx/models/whatsapp/phone_numbers/whatsapp_profile_data.rbi +0 -155
  198. data/rbi/telnyx/models/whatsapp_message_template_retrieve_response.rbi +0 -33
  199. data/rbi/telnyx/models/whatsapp_message_template_update_params.rbi +0 -106
  200. data/rbi/telnyx/models/whatsapp_message_template_update_response.rbi +0 -33
  201. data/rbi/telnyx/resources/speech_to_text.rbi +0 -71
  202. data/rbi/telnyx/resources/whatsapp_message_templates.rbi +0 -57
  203. data/sig/telnyx/models/speech_to_text_transcribe_params.rbs +0 -141
  204. data/sig/telnyx/models/voice_clone_create_response.rbs +0 -15
  205. data/sig/telnyx/models/voice_design_data.rbs +0 -97
  206. data/sig/telnyx/models/whatsapp/phone_numbers/whatsapp_profile_data.rbs +0 -110
  207. data/sig/telnyx/models/whatsapp_message_template_retrieve_response.rbs +0 -16
  208. data/sig/telnyx/models/whatsapp_message_template_update_params.rbs +0 -56
  209. data/sig/telnyx/models/whatsapp_message_template_update_response.rbs +0 -16
  210. data/sig/telnyx/models/x402/credit_account_settle_params.rbs +0 -42
  211. data/sig/telnyx/resources/speech_to_text.rbs +0 -20
  212. data/sig/telnyx/resources/whatsapp/templates.rbs +0 -28
  213. data/sig/telnyx/resources/whatsapp_message_templates.rbs +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: deb4068a838d94b98a182f7b76c9d0ee71d94fab0ec0956bafaab07d59af5dbc
4
- data.tar.gz: 97349ade44f0e375639faadd120a0955e0c340fe20615a33b362bdceab146234
3
+ metadata.gz: ff2a9579527d16c495311572f44f61609005becc0eb8062bfa342bb97be43ba2
4
+ data.tar.gz: 8bd424965e38f9c82c70d083f59addc00b99fc85707b431f5628a4e38e12391c
5
5
  SHA512:
6
- metadata.gz: 496d2ab49bc3c285f630627f0a9efd4f72970d1ef8f4cd3f6cdfe46b4249c8c342ea0162446f522484d832a42370e2ab7a882e9ba2254e98e8311ce03a9345fe
7
- data.tar.gz: 6bd0084e27beba6a08b7d44d0cfa9ae790820ca87b1acf1d37f6576b7c3ea2c75c39b0cf5790b1a5ccd84a24241209c40b3b9f7cb07dd3a8dd357574a31bd835
6
+ metadata.gz: f2775eb95017b5dc9ea81d5e7b69284e6f74ed2ddb342c5235f6b33c2218086406584586ec63b8ebffe6d748a0b3306f66b84333080795bc3d839b941f82b00d
7
+ data.tar.gz: ecdac5540274b2dd4acfbf37a09f9954d3f86417a115d950dcea0010dfcec163cfbde3417f71d4a81aa113d7be697f2de66d0d22bb9dc84deb151c81a9ede0c6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.59.0 (2026-03-19)
4
+
5
+ Full Changelog: [v5.58.0...v5.59.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.58.0...v5.59.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([8105361](https://github.com/team-telnyx/telnyx-ruby/commit/81053613aee31cb01061ad1e55c4997d727ff9e8))
10
+ * **api:** manual updates ([bd1eab5](https://github.com/team-telnyx/telnyx-ruby/commit/bd1eab5de098d98d53fc00aefc35dbe825fcd825))
11
+ * TELAPPS-5668: Add call.cost webhook event documentation ([ad13577](https://github.com/team-telnyx/telnyx-ruby/commit/ad1357775aeffb088773216f099dc0ba7ac667e9))
12
+ * **wireless:** add traffic policy profiles endpoints to OpenAPI spec ([9d09743](https://github.com/team-telnyx/telnyx-ruby/commit/9d09743b1ddd22f8a9c296fc19636a0b07137554))
13
+
14
+
15
+ ### Documentation
16
+
17
+ * **tts:** Add Telnyx.Ultra model documentation ([fd748f2](https://github.com/team-telnyx/telnyx-ruby/commit/fd748f289da493776d1c1e35322abd2333e0b650))
18
+
3
19
  ## 5.58.0 (2026-03-18)
4
20
 
5
21
  Full Changelog: [v5.57.0...v5.58.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.57.0...v5.58.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.58.0"
27
+ gem "telnyx", "~> 5.59.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
data/lib/telnyx/client.rb CHANGED
@@ -620,12 +620,15 @@ module Telnyx
620
620
  # @return [Telnyx::Resources::SessionAnalysis]
621
621
  attr_reader :session_analysis
622
622
 
623
+ # Traffic Policy Profiles operations
624
+ # @return [Telnyx::Resources::TrafficPolicyProfiles]
625
+ attr_reader :traffic_policy_profiles
626
+
623
627
  # @return [Telnyx::Resources::Whatsapp]
624
628
  attr_reader :whatsapp
625
629
 
626
- # Manage Whatsapp message templates
627
- # @return [Telnyx::Resources::WhatsappMessageTemplates]
628
- attr_reader :whatsapp_message_templates
630
+ # @return [Telnyx::Resources::X402]
631
+ attr_reader :x402
629
632
 
630
633
  # Capture and manage voice identities as clones for use in text-to-speech
631
634
  # synthesis.
@@ -636,13 +639,6 @@ module Telnyx
636
639
  # @return [Telnyx::Resources::VoiceDesigns]
637
640
  attr_reader :voice_designs
638
641
 
639
- # @return [Telnyx::Resources::X402]
640
- attr_reader :x402
641
-
642
- # Speech to text command operations
643
- # @return [Telnyx::Resources::SpeechToText]
644
- attr_reader :speech_to_text
645
-
646
642
  # @api private
647
643
  #
648
644
  # @return [Hash{String=>String}]
@@ -891,12 +887,11 @@ module Telnyx
891
887
  @alphanumeric_sender_ids = Telnyx::Resources::AlphanumericSenderIDs.new(client: self)
892
888
  @messaging_profile_metrics = Telnyx::Resources::MessagingProfileMetrics.new(client: self)
893
889
  @session_analysis = Telnyx::Resources::SessionAnalysis.new(client: self)
890
+ @traffic_policy_profiles = Telnyx::Resources::TrafficPolicyProfiles.new(client: self)
894
891
  @whatsapp = Telnyx::Resources::Whatsapp.new(client: self)
895
- @whatsapp_message_templates = Telnyx::Resources::WhatsappMessageTemplates.new(client: self)
892
+ @x402 = Telnyx::Resources::X402.new(client: self)
896
893
  @voice_clones = Telnyx::Resources::VoiceClones.new(client: self)
897
894
  @voice_designs = Telnyx::Resources::VoiceDesigns.new(client: self)
898
- @x402 = Telnyx::Resources::X402.new(client: self)
899
- @speech_to_text = Telnyx::Resources::SpeechToText.new(client: self)
900
895
  end
901
896
  end
902
897
  end
@@ -4,8 +4,8 @@ module Telnyx
4
4
  module Models
5
5
  module AI
6
6
  module Assistants
7
- # @see Telnyx::Resources::AI::Assistants::Tags#remove
8
- class TagRemoveParams < Telnyx::Internal::Type::BaseModel
7
+ # @see Telnyx::Resources::AI::Assistants::Tags#create
8
+ class TagCreateParams < Telnyx::Internal::Type::BaseModel
9
9
  extend Telnyx::Internal::Type::RequestParameters::Converter
10
10
  include Telnyx::Internal::Type::RequestParameters
11
11
 
@@ -4,8 +4,8 @@ module Telnyx
4
4
  module Models
5
5
  module AI
6
6
  module Assistants
7
- # @see Telnyx::Resources::AI::Assistants::Tags#remove
8
- class TagRemoveResponse < Telnyx::Internal::Type::BaseModel
7
+ # @see Telnyx::Resources::AI::Assistants::Tags#create
8
+ class TagCreateResponse < Telnyx::Internal::Type::BaseModel
9
9
  # @!attribute tags
10
10
  #
11
11
  # @return [Array<String>]
@@ -4,8 +4,8 @@ module Telnyx
4
4
  module Models
5
5
  module AI
6
6
  module Assistants
7
- # @see Telnyx::Resources::AI::Assistants::Tags#add
8
- class TagAddParams < Telnyx::Internal::Type::BaseModel
7
+ # @see Telnyx::Resources::AI::Assistants::Tags#delete
8
+ class TagDeleteParams < Telnyx::Internal::Type::BaseModel
9
9
  extend Telnyx::Internal::Type::RequestParameters::Converter
10
10
  include Telnyx::Internal::Type::RequestParameters
11
11
 
@@ -4,8 +4,8 @@ module Telnyx
4
4
  module Models
5
5
  module AI
6
6
  module Assistants
7
- # @see Telnyx::Resources::AI::Assistants::Tags#add
8
- class TagAddResponse < Telnyx::Internal::Type::BaseModel
7
+ # @see Telnyx::Resources::AI::Assistants::Tags#delete
8
+ class TagDeleteResponse < Telnyx::Internal::Type::BaseModel
9
9
  # @!attribute tags
10
10
  #
11
11
  # @return [Array<String>]
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class StreamClientEvent < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute text
7
+ # Text to convert to speech. Send `" "` (single space) as an initial handshake
8
+ # with optional `voice_settings`. Subsequent messages contain the actual text to
9
+ # synthesize.
10
+ #
11
+ # @return [String]
12
+ required :text, String
13
+
14
+ # @!attribute force
15
+ # When `true`, stops the current synthesis worker and starts a new one. Used to
16
+ # interrupt speech mid-stream and begin synthesizing new text.
17
+ #
18
+ # @return [Boolean, nil]
19
+ optional :force, Telnyx::Internal::Type::Boolean
20
+
21
+ # @!attribute voice_settings
22
+ # Provider-specific voice settings sent with the initial handshake. Contents vary
23
+ # by provider — e.g. `{"speed": 1.2}` for Minimax, `{"voice_speed": 1.5}` for
24
+ # Telnyx.
25
+ #
26
+ # @return [Hash{Symbol=>Object}, nil]
27
+ optional :voice_settings, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
28
+
29
+ # @!method initialize(text:, force: nil, voice_settings: nil)
30
+ # Some parameter documentations has been truncated, see
31
+ # {Telnyx::Models::StreamClientEvent} for more details.
32
+ #
33
+ # Client-to-server frame containing text to synthesize.
34
+ #
35
+ # @param text [String] Text to convert to speech. Send `" "` (single space) as an initial handshake wit
36
+ #
37
+ # @param force [Boolean] When `true`, stops the current synthesis worker and starts a new one. Used to in
38
+ #
39
+ # @param voice_settings [Hash{Symbol=>Object}] Provider-specific voice settings sent with the initial handshake. Contents vary
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,200 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # Union of all server-to-client WebSocket events for TTS streaming.
6
+ module StreamServerEvent
7
+ extend Telnyx::Internal::Type::Union
8
+
9
+ discriminator :type
10
+
11
+ # Server-to-client frame containing a base64-encoded audio chunk.
12
+ variant :audio_chunk, -> { Telnyx::Models::StreamServerEvent::AudioChunk }
13
+
14
+ # Server-to-client frame indicating synthesis is complete for the current text.
15
+ variant :final, -> { Telnyx::Models::StreamServerEvent::FinalFrameEvent }
16
+
17
+ # Server-to-client frame indicating an error during synthesis. The connection is closed shortly after.
18
+ variant :error, -> { Telnyx::Models::StreamServerEvent::Error }
19
+
20
+ class AudioChunk < Telnyx::Internal::Type::BaseModel
21
+ # @!attribute audio
22
+ # Base64-encoded audio data. May be `null` for providers that use
23
+ # `drop_concatenated_audio` mode (Telnyx Natural/NaturalHD, Rime, Minimax, MurfAI,
24
+ # Resemble) — in that case only streamed chunks carry audio.
25
+ #
26
+ # @return [String, nil]
27
+ optional :audio, String, nil?: true
28
+
29
+ # @!attribute cached
30
+ # Whether this audio was served from cache.
31
+ #
32
+ # @return [Boolean, nil]
33
+ optional :cached, Telnyx::Internal::Type::Boolean
34
+
35
+ # @!attribute is_final
36
+ # Always `false` for audio chunk frames.
37
+ #
38
+ # @return [Boolean, nil]
39
+ optional :is_final, Telnyx::Internal::Type::Boolean, api_name: :isFinal
40
+
41
+ # @!attribute text
42
+ # The text segment that this audio chunk corresponds to.
43
+ #
44
+ # @return [String, nil]
45
+ optional :text, String, nil?: true
46
+
47
+ # @!attribute time_to_first_audio_frame_ms
48
+ # Milliseconds from the start-of-speech request to the first audio frame. Only
49
+ # present on the first audio chunk of a synthesis request.
50
+ #
51
+ # @return [Integer, nil]
52
+ optional :time_to_first_audio_frame_ms, Integer, api_name: :timeToFirstAudioFrameMs
53
+
54
+ # @!attribute type
55
+ # Frame type identifier.
56
+ #
57
+ # @return [Symbol, Telnyx::Models::StreamServerEvent::AudioChunk::Type, nil]
58
+ optional :type, enum: -> { Telnyx::Models::StreamServerEvent::AudioChunk::Type }
59
+
60
+ # @!method initialize(audio: nil, cached: nil, is_final: nil, text: nil, time_to_first_audio_frame_ms: nil, type: nil)
61
+ # Some parameter documentations has been truncated, see
62
+ # {Telnyx::Models::StreamServerEvent::AudioChunk} for more details.
63
+ #
64
+ # Server-to-client frame containing a base64-encoded audio chunk.
65
+ #
66
+ # @param audio [String, nil] Base64-encoded audio data. May be `null` for providers that use `drop_concatenat
67
+ #
68
+ # @param cached [Boolean] Whether this audio was served from cache.
69
+ #
70
+ # @param is_final [Boolean] Always `false` for audio chunk frames.
71
+ #
72
+ # @param text [String, nil] The text segment that this audio chunk corresponds to.
73
+ #
74
+ # @param time_to_first_audio_frame_ms [Integer] Milliseconds from the start-of-speech request to the first audio frame. Only pre
75
+ #
76
+ # @param type [Symbol, Telnyx::Models::StreamServerEvent::AudioChunk::Type] Frame type identifier.
77
+
78
+ # Frame type identifier.
79
+ #
80
+ # @see Telnyx::Models::StreamServerEvent::AudioChunk#type
81
+ module Type
82
+ extend Telnyx::Internal::Type::Enum
83
+
84
+ AUDIO_CHUNK = :audio_chunk
85
+
86
+ # @!method self.values
87
+ # @return [Array<Symbol>]
88
+ end
89
+ end
90
+
91
+ class FinalFrameEvent < Telnyx::Internal::Type::BaseModel
92
+ # @!attribute audio
93
+ # Always `null` for the final frame.
94
+ #
95
+ # @return [nil]
96
+ optional :audio, NilClass
97
+
98
+ # @!attribute is_final
99
+ # Always `true`.
100
+ #
101
+ # @return [Boolean, Telnyx::Models::StreamServerEvent::FinalFrameEvent::IsFinal, nil]
102
+ optional :is_final,
103
+ enum: -> { Telnyx::Models::StreamServerEvent::FinalFrameEvent::IsFinal },
104
+ api_name: :isFinal
105
+
106
+ # @!attribute text
107
+ # Empty string.
108
+ #
109
+ # @return [String, nil]
110
+ optional :text, String
111
+
112
+ # @!attribute time_to_first_audio_frame_ms
113
+ # Present if this was the first response frame.
114
+ #
115
+ # @return [Integer, nil]
116
+ optional :time_to_first_audio_frame_ms, Integer, api_name: :timeToFirstAudioFrameMs
117
+
118
+ # @!attribute type
119
+ # Frame type identifier.
120
+ #
121
+ # @return [Symbol, Telnyx::Models::StreamServerEvent::FinalFrameEvent::Type, nil]
122
+ optional :type, enum: -> { Telnyx::Models::StreamServerEvent::FinalFrameEvent::Type }
123
+
124
+ # @!method initialize(audio: nil, is_final: nil, text: nil, time_to_first_audio_frame_ms: nil, type: nil)
125
+ # Server-to-client frame indicating synthesis is complete for the current text.
126
+ #
127
+ # @param audio [nil] Always `null` for the final frame.
128
+ #
129
+ # @param is_final [Boolean, Telnyx::Models::StreamServerEvent::FinalFrameEvent::IsFinal] Always `true`.
130
+ #
131
+ # @param text [String] Empty string.
132
+ #
133
+ # @param time_to_first_audio_frame_ms [Integer] Present if this was the first response frame.
134
+ #
135
+ # @param type [Symbol, Telnyx::Models::StreamServerEvent::FinalFrameEvent::Type] Frame type identifier.
136
+
137
+ # Always `true`.
138
+ #
139
+ # @see Telnyx::Models::StreamServerEvent::FinalFrameEvent#is_final
140
+ module IsFinal
141
+ extend Telnyx::Internal::Type::Enum
142
+
143
+ TRUE = true
144
+
145
+ # @!method self.values
146
+ # @return [Array<Boolean>]
147
+ end
148
+
149
+ # Frame type identifier.
150
+ #
151
+ # @see Telnyx::Models::StreamServerEvent::FinalFrameEvent#type
152
+ module Type
153
+ extend Telnyx::Internal::Type::Enum
154
+
155
+ FINAL = :final
156
+
157
+ # @!method self.values
158
+ # @return [Array<Symbol>]
159
+ end
160
+ end
161
+
162
+ class Error < Telnyx::Internal::Type::BaseModel
163
+ # @!attribute error
164
+ # Error message describing what went wrong.
165
+ #
166
+ # @return [String, nil]
167
+ optional :error, String
168
+
169
+ # @!attribute type
170
+ # Frame type identifier.
171
+ #
172
+ # @return [Symbol, Telnyx::Models::StreamServerEvent::Error::Type, nil]
173
+ optional :type, enum: -> { Telnyx::Models::StreamServerEvent::Error::Type }
174
+
175
+ # @!method initialize(error: nil, type: nil)
176
+ # Server-to-client frame indicating an error during synthesis. The connection is
177
+ # closed shortly after.
178
+ #
179
+ # @param error [String] Error message describing what went wrong.
180
+ #
181
+ # @param type [Symbol, Telnyx::Models::StreamServerEvent::Error::Type] Frame type identifier.
182
+
183
+ # Frame type identifier.
184
+ #
185
+ # @see Telnyx::Models::StreamServerEvent::Error#type
186
+ module Type
187
+ extend Telnyx::Internal::Type::Enum
188
+
189
+ ERROR = :error
190
+
191
+ # @!method self.values
192
+ # @return [Array<Symbol>]
193
+ end
194
+ end
195
+
196
+ # @!method self.variants
197
+ # @return [Array(Telnyx::Models::StreamServerEvent::AudioChunk, Telnyx::Models::StreamServerEvent::FinalFrameEvent, Telnyx::Models::StreamServerEvent::Error)]
198
+ end
199
+ end
200
+ end
@@ -31,12 +31,6 @@ module Telnyx
31
31
  # @return [::Telnyx::Models::TextToSpeechGenerateParams::Elevenlabs, nil]
32
32
  optional :elevenlabs, -> { ::Telnyx::TextToSpeechGenerateParams::Elevenlabs }
33
33
 
34
- # @!attribute inworld
35
- # Inworld provider-specific parameters.
36
- #
37
- # @return [Hash{Symbol=>Object}, nil]
38
- optional :inworld, ::Telnyx::Internal::Type::HashOf[::Telnyx::Internal::Type::Unknown]
39
-
40
34
  # @!attribute language
41
35
  # Language code (e.g. `en-US`). Usage varies by provider.
42
36
  #
@@ -75,7 +69,9 @@ module Telnyx
75
69
  optional :rime, -> { ::Telnyx::TextToSpeechGenerateParams::Rime }
76
70
 
77
71
  # @!attribute telnyx
78
- # Telnyx provider-specific parameters.
72
+ # Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
73
+ # `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
74
+ # `volume`, and `emotion`.
79
75
  #
80
76
  # @return [::Telnyx::Models::TextToSpeechGenerateParams::Telnyx, nil]
81
77
  optional :telnyx, -> { ::Telnyx::TextToSpeechGenerateParams::Telnyx }
@@ -95,9 +91,10 @@ module Telnyx
95
91
  # @!attribute voice
96
92
  # Voice identifier in the format `provider.model_id.voice_id` or
97
93
  # `provider.voice_id`. Examples: `telnyx.NaturalHD.Alloy`,
98
- # `azure.en-US-AvaMultilingualNeural`, `aws.Polly.Generative.Lucia`. When
99
- # provided, `provider`, `model_id`, and `voice_id` are extracted automatically and
100
- # take precedence over individual parameters.
94
+ # `Telnyx.Ultra.<voice_id>`, `azure.en-US-AvaMultilingualNeural`,
95
+ # `aws.Polly.Generative.Lucia`. When provided, `provider`, `model_id`, and
96
+ # `voice_id` are extracted automatically and take precedence over individual
97
+ # parameters.
101
98
  #
102
99
  # @return [String, nil]
103
100
  optional :voice, String
@@ -109,7 +106,7 @@ module Telnyx
109
106
  # @return [Hash{Symbol=>Object}, nil]
110
107
  optional :voice_settings, ::Telnyx::Internal::Type::HashOf[::Telnyx::Internal::Type::Unknown]
111
108
 
112
- # @!method initialize(aws: nil, azure: nil, disable_cache: nil, elevenlabs: nil, inworld: nil, language: nil, minimax: nil, output_type: nil, provider: nil, resemble: nil, rime: nil, telnyx: nil, text: nil, text_type: nil, voice: nil, voice_settings: nil, request_options: {})
109
+ # @!method initialize(aws: nil, azure: nil, disable_cache: nil, elevenlabs: nil, language: nil, minimax: nil, output_type: nil, provider: nil, resemble: nil, rime: nil, telnyx: nil, text: nil, text_type: nil, voice: nil, voice_settings: nil, request_options: {})
113
110
  # Some parameter documentations has been truncated, see
114
111
  # {::Telnyx::Models::TextToSpeechGenerateParams} for more details.
115
112
  #
@@ -121,8 +118,6 @@ module Telnyx
121
118
  #
122
119
  # @param elevenlabs [::Telnyx::Models::TextToSpeechGenerateParams::Elevenlabs] ElevenLabs provider-specific parameters.
123
120
  #
124
- # @param inworld [Hash{Symbol=>Object}] Inworld provider-specific parameters.
125
- #
126
121
  # @param language [String] Language code (e.g. `en-US`). Usage varies by provider.
127
122
  #
128
123
  # @param minimax [::Telnyx::Models::TextToSpeechGenerateParams::Minimax] Minimax provider-specific parameters.
@@ -135,7 +130,7 @@ module Telnyx
135
130
  #
136
131
  # @param rime [::Telnyx::Models::TextToSpeechGenerateParams::Rime] Rime provider-specific parameters.
137
132
  #
138
- # @param telnyx [::Telnyx::Models::TextToSpeechGenerateParams::Telnyx] Telnyx provider-specific parameters.
133
+ # @param telnyx [::Telnyx::Models::TextToSpeechGenerateParams::Telnyx] Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for `Na
139
134
  #
140
135
  # @param text [String] The text to convert to speech.
141
136
  #
@@ -384,7 +379,6 @@ module Telnyx
384
379
  MINIMAX = :minimax
385
380
  RIME = :rime
386
381
  RESEMBLE = :resemble
387
- INWORLD = :inworld
388
382
 
389
383
  # @!method self.values
390
384
  # @return [Array<Symbol>]
@@ -457,6 +451,13 @@ module Telnyx
457
451
  end
458
452
 
459
453
  class Telnyx < ::Telnyx::Internal::Type::BaseModel
454
+ # @!attribute emotion
455
+ # Emotion control for the Ultra model. Adjusts the emotional tone of the
456
+ # synthesized speech.
457
+ #
458
+ # @return [Symbol, ::Telnyx::Models::TextToSpeechGenerateParams::Telnyx::Emotion, nil]
459
+ optional :emotion, enum: -> { ::Telnyx::TextToSpeechGenerateParams::Telnyx::Emotion }
460
+
460
461
  # @!attribute response_format
461
462
  # Audio response format.
462
463
  #
@@ -470,27 +471,61 @@ module Telnyx
470
471
  optional :sampling_rate, Integer
471
472
 
472
473
  # @!attribute temperature
473
- # Sampling temperature.
474
+ # Sampling temperature. Applies to `Natural` and `NaturalHD` models only.
474
475
  #
475
476
  # @return [Float, nil]
476
477
  optional :temperature, Float
477
478
 
478
479
  # @!attribute voice_speed
479
- # Voice speed multiplier.
480
+ # Voice speed multiplier. Applies to all models. Range: 0.5 to 2.0.
480
481
  #
481
482
  # @return [Float, nil]
482
483
  optional :voice_speed, Float
483
484
 
484
- # @!method initialize(response_format: nil, sampling_rate: nil, temperature: nil, voice_speed: nil)
485
- # Telnyx provider-specific parameters.
485
+ # @!attribute volume
486
+ # Volume level for the Ultra model. Range: 0.0 to 2.0.
487
+ #
488
+ # @return [Float, nil]
489
+ optional :volume, Float
490
+
491
+ # @!method initialize(emotion: nil, response_format: nil, sampling_rate: nil, temperature: nil, voice_speed: nil, volume: nil)
492
+ # Some parameter documentations has been truncated, see
493
+ # {::Telnyx::Models::TextToSpeechGenerateParams::Telnyx} for more details.
494
+ #
495
+ # Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
496
+ # `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
497
+ # `volume`, and `emotion`.
498
+ #
499
+ # @param emotion [Symbol, ::Telnyx::Models::TextToSpeechGenerateParams::Telnyx::Emotion] Emotion control for the Ultra model. Adjusts the emotional tone of the synthesiz
486
500
  #
487
501
  # @param response_format [String] Audio response format.
488
502
  #
489
503
  # @param sampling_rate [Integer] Audio sampling rate in Hz.
490
504
  #
491
- # @param temperature [Float] Sampling temperature.
505
+ # @param temperature [Float] Sampling temperature. Applies to `Natural` and `NaturalHD` models only.
492
506
  #
493
- # @param voice_speed [Float] Voice speed multiplier.
507
+ # @param voice_speed [Float] Voice speed multiplier. Applies to all models. Range: 0.5 to 2.0.
508
+ #
509
+ # @param volume [Float] Volume level for the Ultra model. Range: 0.0 to 2.0.
510
+
511
+ # Emotion control for the Ultra model. Adjusts the emotional tone of the
512
+ # synthesized speech.
513
+ #
514
+ # @see Telnyx::Models::TextToSpeechGenerateParams::Telnyx#emotion
515
+ module Emotion
516
+ extend ::Telnyx::Internal::Type::Enum
517
+
518
+ NEUTRAL = :neutral
519
+ HAPPY = :happy
520
+ SAD = :sad
521
+ ANGRY = :angry
522
+ FEARFUL = :fearful
523
+ DISGUSTED = :disgusted
524
+ SURPRISED = :surprised
525
+
526
+ # @!method self.values
527
+ # @return [Array<Symbol>]
528
+ end
494
529
  end
495
530
 
496
531
  # Text type. Use `ssml` for SSML-formatted input (supported by AWS and Azure).
@@ -37,7 +37,6 @@ module Telnyx
37
37
  MINIMAX = :minimax
38
38
  RIME = :rime
39
39
  RESEMBLE = :resemble
40
- INWORLD = :inworld
41
40
 
42
41
  # @!method self.values
43
42
  # @return [Array<Symbol>]
@@ -7,106 +7,8 @@ module Telnyx
7
7
  extend Telnyx::Internal::Type::RequestParameters::Converter
8
8
  include Telnyx::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute audio_format
11
- # Audio output format override. Supported for Telnyx `Natural`/`NaturalHD` models
12
- # only. Accepted values: `pcm`, `wav`.
13
- #
14
- # @return [Symbol, Telnyx::Models::TextToSpeechStreamParams::AudioFormat, nil]
15
- optional :audio_format, enum: -> { Telnyx::TextToSpeechStreamParams::AudioFormat }
16
-
17
- # @!attribute disable_cache
18
- # When `true`, bypass the audio cache and generate fresh audio.
19
- #
20
- # @return [Boolean, nil]
21
- optional :disable_cache, Telnyx::Internal::Type::Boolean
22
-
23
- # @!attribute model_id
24
- # Model identifier for the chosen provider. Examples: `Natural`, `NaturalHD`
25
- # (Telnyx); `Polly.Generative` (AWS).
26
- #
27
- # @return [String, nil]
28
- optional :model_id, String
29
-
30
- # @!attribute provider
31
- # TTS provider. Defaults to `telnyx` if not specified. Ignored when `voice` is
32
- # provided.
33
- #
34
- # @return [Symbol, Telnyx::Models::TextToSpeechStreamParams::Provider, nil]
35
- optional :provider, enum: -> { Telnyx::TextToSpeechStreamParams::Provider }
36
-
37
- # @!attribute socket_id
38
- # Client-provided socket identifier for tracking. If not provided, one is
39
- # generated server-side.
40
- #
41
- # @return [String, nil]
42
- optional :socket_id, String
43
-
44
- # @!attribute voice
45
- # Voice identifier in the format `provider.model_id.voice_id` or
46
- # `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy` or
47
- # `azure.en-US-AvaMultilingualNeural`). When provided, the `provider`, `model_id`,
48
- # and `voice_id` are extracted automatically. Takes precedence over individual
49
- # `provider`/`model_id`/`voice_id` parameters.
50
- #
51
- # @return [String, nil]
52
- optional :voice, String
53
-
54
- # @!attribute voice_id
55
- # Voice identifier for the chosen provider.
56
- #
57
- # @return [String, nil]
58
- optional :voice_id, String
59
-
60
- # @!method initialize(audio_format: nil, disable_cache: nil, model_id: nil, provider: nil, socket_id: nil, voice: nil, voice_id: nil, request_options: {})
61
- # Some parameter documentations has been truncated, see
62
- # {Telnyx::Models::TextToSpeechStreamParams} for more details.
63
- #
64
- # @param audio_format [Symbol, Telnyx::Models::TextToSpeechStreamParams::AudioFormat] Audio output format override. Supported for Telnyx `Natural`/`NaturalHD` models
65
- #
66
- # @param disable_cache [Boolean] When `true`, bypass the audio cache and generate fresh audio.
67
- #
68
- # @param model_id [String] Model identifier for the chosen provider. Examples: `Natural`, `NaturalHD` (Teln
69
- #
70
- # @param provider [Symbol, Telnyx::Models::TextToSpeechStreamParams::Provider] TTS provider. Defaults to `telnyx` if not specified. Ignored when `voice` is pro
71
- #
72
- # @param socket_id [String] Client-provided socket identifier for tracking. If not provided, one is generate
73
- #
74
- # @param voice [String] Voice identifier in the format `provider.model_id.voice_id` or `provider.voice_i
75
- #
76
- # @param voice_id [String] Voice identifier for the chosen provider.
77
- #
10
+ # @!method initialize(request_options: {})
78
11
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
79
-
80
- # Audio output format override. Supported for Telnyx `Natural`/`NaturalHD` models
81
- # only. Accepted values: `pcm`, `wav`.
82
- module AudioFormat
83
- extend Telnyx::Internal::Type::Enum
84
-
85
- PCM = :pcm
86
- WAV = :wav
87
-
88
- # @!method self.values
89
- # @return [Array<Symbol>]
90
- end
91
-
92
- # TTS provider. Defaults to `telnyx` if not specified. Ignored when `voice` is
93
- # provided.
94
- module Provider
95
- extend Telnyx::Internal::Type::Enum
96
-
97
- AWS = :aws
98
- TELNYX = :telnyx
99
- AZURE = :azure
100
- ELEVENLABS = :elevenlabs
101
- MINIMAX = :minimax
102
- MURFAI = :murfai
103
- RIME = :rime
104
- RESEMBLE = :resemble
105
- INWORLD = :inworld
106
-
107
- # @!method self.values
108
- # @return [Array<Symbol>]
109
- end
110
12
  end
111
13
  end
112
14
  end