telnyx 5.42.0 → 5.44.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +1 -1
- data/lib/telnyx/models/{queue_list_response.rb → queue.rb} +7 -7
- data/lib/telnyx/models/queue_create_response.rb +3 -84
- data/lib/telnyx/models/queue_retrieve_response.rb +3 -84
- data/lib/telnyx/models/queue_update_response.rb +3 -84
- data/lib/telnyx/models/text_to_speech_stream_params.rb +111 -0
- data/lib/telnyx/models.rb +4 -2
- data/lib/telnyx/resources/queues.rb +2 -2
- data/lib/telnyx/resources/text_to_speech.rb +54 -27
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +2 -2
- data/rbi/telnyx/models/{queue_list_response.rbi → queue.rbi} +8 -25
- data/rbi/telnyx/models/queue_create_response.rbi +4 -138
- data/rbi/telnyx/models/queue_retrieve_response.rbi +4 -138
- data/rbi/telnyx/models/queue_update_response.rbi +4 -138
- data/rbi/telnyx/models/text_to_speech_stream_params.rbi +231 -0
- data/rbi/telnyx/models.rbi +4 -3
- data/rbi/telnyx/resources/queues.rbi +1 -5
- data/rbi/telnyx/resources/text_to_speech.rbi +59 -28
- data/sig/telnyx/models/{queue_list_response.rbs → queue.rbs} +7 -7
- data/sig/telnyx/models/queue_create_response.rbs +5 -70
- data/sig/telnyx/models/queue_retrieve_response.rbs +5 -72
- data/sig/telnyx/models/queue_update_response.rbs +5 -70
- data/sig/telnyx/models/text_to_speech_stream_params.rbs +110 -0
- data/sig/telnyx/models.rbs +4 -2
- data/sig/telnyx/resources/queues.rbs +1 -1
- data/sig/telnyx/resources/text_to_speech.rbs +11 -6
- metadata +8 -8
- data/lib/telnyx/models/text_to_speech_generate_speech_params.rb +0 -43
- data/rbi/telnyx/models/text_to_speech_generate_speech_params.rbi +0 -74
- data/sig/telnyx/models/text_to_speech_generate_speech_params.rbs +0 -28
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7fe268e9f5711b397cebf7cdde7592128a848e61bf2030a7b3cab7d2420f4997
|
|
4
|
+
data.tar.gz: 2eef9ec8559af1b1562f516b43f741cd886611433a46aaeb5cdaf4878f4a05ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69e947ca4bd0dda23730add20dab9f170dfd6c7a4bc35b71d169200ead869c7611099a69cadef7684e48b66e8c47fdbde96f4e488f4853e9a81eab93c2f8aea3
|
|
7
|
+
data.tar.gz: d7283bb88ef4b9439f5c8e15df31a35aba4daabe04699136ceb182334ad17b59d21933f7aec3ec4c5e41a728307d5461786e682bc41898c301088233961e92cc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.44.0 (2026-02-26)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v5.43.0...v5.44.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.43.0...v5.44.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Add text-to-speech WebSocket streaming OpenAPI spec ([c6c082b](https://github.com/team-telnyx/telnyx-ruby/commit/c6c082b8a0d47d63c136f7c81e5bd4eceffb2872))
|
|
10
|
+
* **api:** manual updates ([d834462](https://github.com/team-telnyx/telnyx-ruby/commit/d834462641d4d929399bf7dbdef9e1bac6dcde8a))
|
|
11
|
+
|
|
12
|
+
## 5.43.0 (2026-02-25)
|
|
13
|
+
|
|
14
|
+
Full Changelog: [v5.42.0...v5.43.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.42.0...v5.43.0)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **api:** manual updates ([f5c7abe](https://github.com/team-telnyx/telnyx-ruby/commit/f5c7abe0f5d64327a778547bb5a6b2166afc5176))
|
|
19
|
+
|
|
3
20
|
## 5.42.0 (2026-02-25)
|
|
4
21
|
|
|
5
22
|
Full Changelog: [v5.41.0...v5.42.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.41.0...v5.42.0)
|
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Telnyx
|
|
4
4
|
module Models
|
|
5
5
|
# @see Telnyx::Resources::Queues#list
|
|
6
|
-
class
|
|
6
|
+
class Queue < Telnyx::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute id
|
|
8
8
|
# Uniquely identifies the queue
|
|
9
9
|
#
|
|
@@ -43,8 +43,8 @@ module Telnyx
|
|
|
43
43
|
|
|
44
44
|
# @!attribute record_type
|
|
45
45
|
#
|
|
46
|
-
# @return [Symbol, Telnyx::Models::
|
|
47
|
-
required :record_type, enum: -> { Telnyx::
|
|
46
|
+
# @return [Symbol, Telnyx::Models::Queue::RecordType]
|
|
47
|
+
required :record_type, enum: -> { Telnyx::Queue::RecordType }
|
|
48
48
|
|
|
49
49
|
# @!attribute updated_at
|
|
50
50
|
# ISO 8601 formatted date of when the queue was last updated
|
|
@@ -53,8 +53,8 @@ module Telnyx
|
|
|
53
53
|
required :updated_at, String
|
|
54
54
|
|
|
55
55
|
# @!method initialize(id:, average_wait_time_secs:, created_at:, current_size:, max_size:, name:, record_type:, updated_at:)
|
|
56
|
-
# Some parameter documentations has been truncated, see
|
|
57
|
-
#
|
|
56
|
+
# Some parameter documentations has been truncated, see {Telnyx::Models::Queue}
|
|
57
|
+
# for more details.
|
|
58
58
|
#
|
|
59
59
|
# @param id [String] Uniquely identifies the queue
|
|
60
60
|
#
|
|
@@ -68,11 +68,11 @@ module Telnyx
|
|
|
68
68
|
#
|
|
69
69
|
# @param name [String] Name of the queue
|
|
70
70
|
#
|
|
71
|
-
# @param record_type [Symbol, Telnyx::Models::
|
|
71
|
+
# @param record_type [Symbol, Telnyx::Models::Queue::RecordType]
|
|
72
72
|
#
|
|
73
73
|
# @param updated_at [String] ISO 8601 formatted date of when the queue was last updated
|
|
74
74
|
|
|
75
|
-
# @see Telnyx::Models::
|
|
75
|
+
# @see Telnyx::Models::Queue#record_type
|
|
76
76
|
module RecordType
|
|
77
77
|
extend Telnyx::Internal::Type::Enum
|
|
78
78
|
|
|
@@ -6,92 +6,11 @@ module Telnyx
|
|
|
6
6
|
class QueueCreateResponse < Telnyx::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute data
|
|
8
8
|
#
|
|
9
|
-
# @return [Telnyx::Models::
|
|
10
|
-
optional :data, -> { Telnyx::
|
|
9
|
+
# @return [Telnyx::Models::Queue, nil]
|
|
10
|
+
optional :data, -> { Telnyx::Queue }
|
|
11
11
|
|
|
12
12
|
# @!method initialize(data: nil)
|
|
13
|
-
# @param data [Telnyx::Models::
|
|
14
|
-
|
|
15
|
-
# @see Telnyx::Models::QueueCreateResponse#data
|
|
16
|
-
class Data < Telnyx::Internal::Type::BaseModel
|
|
17
|
-
# @!attribute id
|
|
18
|
-
# Uniquely identifies the queue
|
|
19
|
-
#
|
|
20
|
-
# @return [String]
|
|
21
|
-
required :id, String
|
|
22
|
-
|
|
23
|
-
# @!attribute average_wait_time_secs
|
|
24
|
-
# The average time that the calls currently in the queue have spent waiting, given
|
|
25
|
-
# in seconds.
|
|
26
|
-
#
|
|
27
|
-
# @return [Integer]
|
|
28
|
-
required :average_wait_time_secs, Integer
|
|
29
|
-
|
|
30
|
-
# @!attribute created_at
|
|
31
|
-
# ISO 8601 formatted date of when the queue was created
|
|
32
|
-
#
|
|
33
|
-
# @return [String]
|
|
34
|
-
required :created_at, String
|
|
35
|
-
|
|
36
|
-
# @!attribute current_size
|
|
37
|
-
# The number of calls currently in the queue
|
|
38
|
-
#
|
|
39
|
-
# @return [Integer]
|
|
40
|
-
required :current_size, Integer
|
|
41
|
-
|
|
42
|
-
# @!attribute max_size
|
|
43
|
-
# The maximum number of calls allowed in the queue
|
|
44
|
-
#
|
|
45
|
-
# @return [Integer]
|
|
46
|
-
required :max_size, Integer
|
|
47
|
-
|
|
48
|
-
# @!attribute name
|
|
49
|
-
# Name of the queue
|
|
50
|
-
#
|
|
51
|
-
# @return [String]
|
|
52
|
-
required :name, String
|
|
53
|
-
|
|
54
|
-
# @!attribute record_type
|
|
55
|
-
#
|
|
56
|
-
# @return [Symbol, Telnyx::Models::QueueCreateResponse::Data::RecordType]
|
|
57
|
-
required :record_type, enum: -> { Telnyx::Models::QueueCreateResponse::Data::RecordType }
|
|
58
|
-
|
|
59
|
-
# @!attribute updated_at
|
|
60
|
-
# ISO 8601 formatted date of when the queue was last updated
|
|
61
|
-
#
|
|
62
|
-
# @return [String]
|
|
63
|
-
required :updated_at, String
|
|
64
|
-
|
|
65
|
-
# @!method initialize(id:, average_wait_time_secs:, created_at:, current_size:, max_size:, name:, record_type:, updated_at:)
|
|
66
|
-
# Some parameter documentations has been truncated, see
|
|
67
|
-
# {Telnyx::Models::QueueCreateResponse::Data} for more details.
|
|
68
|
-
#
|
|
69
|
-
# @param id [String] Uniquely identifies the queue
|
|
70
|
-
#
|
|
71
|
-
# @param average_wait_time_secs [Integer] The average time that the calls currently in the queue have spent waiting, given
|
|
72
|
-
#
|
|
73
|
-
# @param created_at [String] ISO 8601 formatted date of when the queue was created
|
|
74
|
-
#
|
|
75
|
-
# @param current_size [Integer] The number of calls currently in the queue
|
|
76
|
-
#
|
|
77
|
-
# @param max_size [Integer] The maximum number of calls allowed in the queue
|
|
78
|
-
#
|
|
79
|
-
# @param name [String] Name of the queue
|
|
80
|
-
#
|
|
81
|
-
# @param record_type [Symbol, Telnyx::Models::QueueCreateResponse::Data::RecordType]
|
|
82
|
-
#
|
|
83
|
-
# @param updated_at [String] ISO 8601 formatted date of when the queue was last updated
|
|
84
|
-
|
|
85
|
-
# @see Telnyx::Models::QueueCreateResponse::Data#record_type
|
|
86
|
-
module RecordType
|
|
87
|
-
extend Telnyx::Internal::Type::Enum
|
|
88
|
-
|
|
89
|
-
QUEUE = :queue
|
|
90
|
-
|
|
91
|
-
# @!method self.values
|
|
92
|
-
# @return [Array<Symbol>]
|
|
93
|
-
end
|
|
94
|
-
end
|
|
13
|
+
# @param data [Telnyx::Models::Queue]
|
|
95
14
|
end
|
|
96
15
|
end
|
|
97
16
|
end
|
|
@@ -6,92 +6,11 @@ module Telnyx
|
|
|
6
6
|
class QueueRetrieveResponse < Telnyx::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute data
|
|
8
8
|
#
|
|
9
|
-
# @return [Telnyx::Models::
|
|
10
|
-
optional :data, -> { Telnyx::
|
|
9
|
+
# @return [Telnyx::Models::Queue, nil]
|
|
10
|
+
optional :data, -> { Telnyx::Queue }
|
|
11
11
|
|
|
12
12
|
# @!method initialize(data: nil)
|
|
13
|
-
# @param data [Telnyx::Models::
|
|
14
|
-
|
|
15
|
-
# @see Telnyx::Models::QueueRetrieveResponse#data
|
|
16
|
-
class Data < Telnyx::Internal::Type::BaseModel
|
|
17
|
-
# @!attribute id
|
|
18
|
-
# Uniquely identifies the queue
|
|
19
|
-
#
|
|
20
|
-
# @return [String]
|
|
21
|
-
required :id, String
|
|
22
|
-
|
|
23
|
-
# @!attribute average_wait_time_secs
|
|
24
|
-
# The average time that the calls currently in the queue have spent waiting, given
|
|
25
|
-
# in seconds.
|
|
26
|
-
#
|
|
27
|
-
# @return [Integer]
|
|
28
|
-
required :average_wait_time_secs, Integer
|
|
29
|
-
|
|
30
|
-
# @!attribute created_at
|
|
31
|
-
# ISO 8601 formatted date of when the queue was created
|
|
32
|
-
#
|
|
33
|
-
# @return [String]
|
|
34
|
-
required :created_at, String
|
|
35
|
-
|
|
36
|
-
# @!attribute current_size
|
|
37
|
-
# The number of calls currently in the queue
|
|
38
|
-
#
|
|
39
|
-
# @return [Integer]
|
|
40
|
-
required :current_size, Integer
|
|
41
|
-
|
|
42
|
-
# @!attribute max_size
|
|
43
|
-
# The maximum number of calls allowed in the queue
|
|
44
|
-
#
|
|
45
|
-
# @return [Integer]
|
|
46
|
-
required :max_size, Integer
|
|
47
|
-
|
|
48
|
-
# @!attribute name
|
|
49
|
-
# Name of the queue
|
|
50
|
-
#
|
|
51
|
-
# @return [String]
|
|
52
|
-
required :name, String
|
|
53
|
-
|
|
54
|
-
# @!attribute record_type
|
|
55
|
-
#
|
|
56
|
-
# @return [Symbol, Telnyx::Models::QueueRetrieveResponse::Data::RecordType]
|
|
57
|
-
required :record_type, enum: -> { Telnyx::Models::QueueRetrieveResponse::Data::RecordType }
|
|
58
|
-
|
|
59
|
-
# @!attribute updated_at
|
|
60
|
-
# ISO 8601 formatted date of when the queue was last updated
|
|
61
|
-
#
|
|
62
|
-
# @return [String]
|
|
63
|
-
required :updated_at, String
|
|
64
|
-
|
|
65
|
-
# @!method initialize(id:, average_wait_time_secs:, created_at:, current_size:, max_size:, name:, record_type:, updated_at:)
|
|
66
|
-
# Some parameter documentations has been truncated, see
|
|
67
|
-
# {Telnyx::Models::QueueRetrieveResponse::Data} for more details.
|
|
68
|
-
#
|
|
69
|
-
# @param id [String] Uniquely identifies the queue
|
|
70
|
-
#
|
|
71
|
-
# @param average_wait_time_secs [Integer] The average time that the calls currently in the queue have spent waiting, given
|
|
72
|
-
#
|
|
73
|
-
# @param created_at [String] ISO 8601 formatted date of when the queue was created
|
|
74
|
-
#
|
|
75
|
-
# @param current_size [Integer] The number of calls currently in the queue
|
|
76
|
-
#
|
|
77
|
-
# @param max_size [Integer] The maximum number of calls allowed in the queue
|
|
78
|
-
#
|
|
79
|
-
# @param name [String] Name of the queue
|
|
80
|
-
#
|
|
81
|
-
# @param record_type [Symbol, Telnyx::Models::QueueRetrieveResponse::Data::RecordType]
|
|
82
|
-
#
|
|
83
|
-
# @param updated_at [String] ISO 8601 formatted date of when the queue was last updated
|
|
84
|
-
|
|
85
|
-
# @see Telnyx::Models::QueueRetrieveResponse::Data#record_type
|
|
86
|
-
module RecordType
|
|
87
|
-
extend Telnyx::Internal::Type::Enum
|
|
88
|
-
|
|
89
|
-
QUEUE = :queue
|
|
90
|
-
|
|
91
|
-
# @!method self.values
|
|
92
|
-
# @return [Array<Symbol>]
|
|
93
|
-
end
|
|
94
|
-
end
|
|
13
|
+
# @param data [Telnyx::Models::Queue]
|
|
95
14
|
end
|
|
96
15
|
end
|
|
97
16
|
end
|
|
@@ -6,92 +6,11 @@ module Telnyx
|
|
|
6
6
|
class QueueUpdateResponse < Telnyx::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute data
|
|
8
8
|
#
|
|
9
|
-
# @return [Telnyx::Models::
|
|
10
|
-
optional :data, -> { Telnyx::
|
|
9
|
+
# @return [Telnyx::Models::Queue, nil]
|
|
10
|
+
optional :data, -> { Telnyx::Queue }
|
|
11
11
|
|
|
12
12
|
# @!method initialize(data: nil)
|
|
13
|
-
# @param data [Telnyx::Models::
|
|
14
|
-
|
|
15
|
-
# @see Telnyx::Models::QueueUpdateResponse#data
|
|
16
|
-
class Data < Telnyx::Internal::Type::BaseModel
|
|
17
|
-
# @!attribute id
|
|
18
|
-
# Uniquely identifies the queue
|
|
19
|
-
#
|
|
20
|
-
# @return [String]
|
|
21
|
-
required :id, String
|
|
22
|
-
|
|
23
|
-
# @!attribute average_wait_time_secs
|
|
24
|
-
# The average time that the calls currently in the queue have spent waiting, given
|
|
25
|
-
# in seconds.
|
|
26
|
-
#
|
|
27
|
-
# @return [Integer]
|
|
28
|
-
required :average_wait_time_secs, Integer
|
|
29
|
-
|
|
30
|
-
# @!attribute created_at
|
|
31
|
-
# ISO 8601 formatted date of when the queue was created
|
|
32
|
-
#
|
|
33
|
-
# @return [String]
|
|
34
|
-
required :created_at, String
|
|
35
|
-
|
|
36
|
-
# @!attribute current_size
|
|
37
|
-
# The number of calls currently in the queue
|
|
38
|
-
#
|
|
39
|
-
# @return [Integer]
|
|
40
|
-
required :current_size, Integer
|
|
41
|
-
|
|
42
|
-
# @!attribute max_size
|
|
43
|
-
# The maximum number of calls allowed in the queue
|
|
44
|
-
#
|
|
45
|
-
# @return [Integer]
|
|
46
|
-
required :max_size, Integer
|
|
47
|
-
|
|
48
|
-
# @!attribute name
|
|
49
|
-
# Name of the queue
|
|
50
|
-
#
|
|
51
|
-
# @return [String]
|
|
52
|
-
required :name, String
|
|
53
|
-
|
|
54
|
-
# @!attribute record_type
|
|
55
|
-
#
|
|
56
|
-
# @return [Symbol, Telnyx::Models::QueueUpdateResponse::Data::RecordType]
|
|
57
|
-
required :record_type, enum: -> { Telnyx::Models::QueueUpdateResponse::Data::RecordType }
|
|
58
|
-
|
|
59
|
-
# @!attribute updated_at
|
|
60
|
-
# ISO 8601 formatted date of when the queue was last updated
|
|
61
|
-
#
|
|
62
|
-
# @return [String]
|
|
63
|
-
required :updated_at, String
|
|
64
|
-
|
|
65
|
-
# @!method initialize(id:, average_wait_time_secs:, created_at:, current_size:, max_size:, name:, record_type:, updated_at:)
|
|
66
|
-
# Some parameter documentations has been truncated, see
|
|
67
|
-
# {Telnyx::Models::QueueUpdateResponse::Data} for more details.
|
|
68
|
-
#
|
|
69
|
-
# @param id [String] Uniquely identifies the queue
|
|
70
|
-
#
|
|
71
|
-
# @param average_wait_time_secs [Integer] The average time that the calls currently in the queue have spent waiting, given
|
|
72
|
-
#
|
|
73
|
-
# @param created_at [String] ISO 8601 formatted date of when the queue was created
|
|
74
|
-
#
|
|
75
|
-
# @param current_size [Integer] The number of calls currently in the queue
|
|
76
|
-
#
|
|
77
|
-
# @param max_size [Integer] The maximum number of calls allowed in the queue
|
|
78
|
-
#
|
|
79
|
-
# @param name [String] Name of the queue
|
|
80
|
-
#
|
|
81
|
-
# @param record_type [Symbol, Telnyx::Models::QueueUpdateResponse::Data::RecordType]
|
|
82
|
-
#
|
|
83
|
-
# @param updated_at [String] ISO 8601 formatted date of when the queue was last updated
|
|
84
|
-
|
|
85
|
-
# @see Telnyx::Models::QueueUpdateResponse::Data#record_type
|
|
86
|
-
module RecordType
|
|
87
|
-
extend Telnyx::Internal::Type::Enum
|
|
88
|
-
|
|
89
|
-
QUEUE = :queue
|
|
90
|
-
|
|
91
|
-
# @!method self.values
|
|
92
|
-
# @return [Array<Symbol>]
|
|
93
|
-
end
|
|
94
|
-
end
|
|
13
|
+
# @param data [Telnyx::Models::Queue]
|
|
95
14
|
end
|
|
96
15
|
end
|
|
97
16
|
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
# @see Telnyx::Resources::TextToSpeech#stream
|
|
6
|
+
class TextToSpeechStreamParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
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
|
+
#
|
|
78
|
+
# @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
|
+
|
|
106
|
+
# @!method self.values
|
|
107
|
+
# @return [Array<Symbol>]
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
data/lib/telnyx/models.rb
CHANGED
|
@@ -1203,6 +1203,8 @@ module Telnyx
|
|
|
1203
1203
|
|
|
1204
1204
|
PwgAssignedResourcesSummary = Telnyx::Models::PwgAssignedResourcesSummary
|
|
1205
1205
|
|
|
1206
|
+
Queue = Telnyx::Models::Queue
|
|
1207
|
+
|
|
1206
1208
|
QueueCreateParams = Telnyx::Models::QueueCreateParams
|
|
1207
1209
|
|
|
1208
1210
|
QueueDeleteParams = Telnyx::Models::QueueDeleteParams
|
|
@@ -1486,10 +1488,10 @@ module Telnyx
|
|
|
1486
1488
|
|
|
1487
1489
|
TexmlSecretsParams = Telnyx::Models::TexmlSecretsParams
|
|
1488
1490
|
|
|
1489
|
-
TextToSpeechGenerateSpeechParams = Telnyx::Models::TextToSpeechGenerateSpeechParams
|
|
1490
|
-
|
|
1491
1491
|
TextToSpeechListVoicesParams = Telnyx::Models::TextToSpeechListVoicesParams
|
|
1492
1492
|
|
|
1493
|
+
TextToSpeechStreamParams = Telnyx::Models::TextToSpeechStreamParams
|
|
1494
|
+
|
|
1493
1495
|
TrafficType = Telnyx::Models::TrafficType
|
|
1494
1496
|
|
|
1495
1497
|
Transcription = Telnyx::Models::Transcription
|
|
@@ -84,7 +84,7 @@ module Telnyx
|
|
|
84
84
|
#
|
|
85
85
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
86
86
|
#
|
|
87
|
-
# @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::
|
|
87
|
+
# @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Queue>]
|
|
88
88
|
#
|
|
89
89
|
# @see Telnyx::Models::QueueListParams
|
|
90
90
|
def list(params = {})
|
|
@@ -94,7 +94,7 @@ module Telnyx
|
|
|
94
94
|
path: "queues",
|
|
95
95
|
query: parsed.transform_keys(page_number: "page[number]", page_size: "page[size]"),
|
|
96
96
|
page: Telnyx::Internal::DefaultFlatPagination,
|
|
97
|
-
model: Telnyx::
|
|
97
|
+
model: Telnyx::Queue,
|
|
98
98
|
options: options
|
|
99
99
|
)
|
|
100
100
|
end
|
|
@@ -3,55 +3,82 @@
|
|
|
3
3
|
module Telnyx
|
|
4
4
|
module Resources
|
|
5
5
|
class TextToSpeech
|
|
6
|
-
#
|
|
7
|
-
# {Telnyx::Models::TextToSpeechGenerateSpeechParams} for more details.
|
|
8
|
-
#
|
|
9
|
-
# Converts the provided text to speech using the specified voice and returns audio
|
|
10
|
-
# data
|
|
6
|
+
# Returns a list of voices that can be used with the text to speech commands.
|
|
11
7
|
#
|
|
12
|
-
# @overload
|
|
8
|
+
# @overload list_voices(elevenlabs_api_key_ref: nil, provider: nil, request_options: {})
|
|
13
9
|
#
|
|
14
|
-
# @param
|
|
10
|
+
# @param elevenlabs_api_key_ref [String] Reference to your ElevenLabs API key stored in the Telnyx Portal
|
|
15
11
|
#
|
|
16
|
-
# @param
|
|
12
|
+
# @param provider [Symbol, Telnyx::Models::TextToSpeechListVoicesParams::Provider] Filter voices by provider
|
|
17
13
|
#
|
|
18
14
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
19
15
|
#
|
|
20
|
-
# @return [
|
|
16
|
+
# @return [Telnyx::Models::TextToSpeechListVoicesResponse]
|
|
21
17
|
#
|
|
22
|
-
# @see Telnyx::Models::
|
|
23
|
-
def
|
|
24
|
-
parsed, options = Telnyx::
|
|
18
|
+
# @see Telnyx::Models::TextToSpeechListVoicesParams
|
|
19
|
+
def list_voices(params = {})
|
|
20
|
+
parsed, options = Telnyx::TextToSpeechListVoicesParams.dump_request(params)
|
|
25
21
|
@client.request(
|
|
26
|
-
method: :
|
|
27
|
-
path: "text-to-speech/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
model: StringIO,
|
|
22
|
+
method: :get,
|
|
23
|
+
path: "text-to-speech/voices",
|
|
24
|
+
query: parsed,
|
|
25
|
+
model: Telnyx::Models::TextToSpeechListVoicesResponse,
|
|
31
26
|
options: options
|
|
32
27
|
)
|
|
33
28
|
end
|
|
34
29
|
|
|
35
|
-
#
|
|
30
|
+
# Some parameter documentations has been truncated, see
|
|
31
|
+
# {Telnyx::Models::TextToSpeechStreamParams} for more details.
|
|
36
32
|
#
|
|
37
|
-
#
|
|
33
|
+
# Open a WebSocket connection to stream text and receive synthesized audio in real
|
|
34
|
+
# time. Authentication is provided via the standard
|
|
35
|
+
# `Authorization: Bearer <API_KEY>` header. Send JSON frames with text to
|
|
36
|
+
# synthesize; receive JSON frames containing base64-encoded audio chunks.
|
|
38
37
|
#
|
|
39
|
-
#
|
|
38
|
+
# Supported providers: `aws`, `telnyx`, `azure`, `murfai`, `minimax`, `rime`,
|
|
39
|
+
# `resemble`, `elevenlabs`.
|
|
40
40
|
#
|
|
41
|
-
#
|
|
41
|
+
# **Connection flow:**
|
|
42
|
+
#
|
|
43
|
+
# 1. Open WebSocket with query parameters specifying provider, voice, and model.
|
|
44
|
+
# 2. Send an initial handshake message `{"text": " "}` (single space) with
|
|
45
|
+
# optional `voice_settings` to initialize the session.
|
|
46
|
+
# 3. Send text messages as `{"text": "Hello world"}`.
|
|
47
|
+
# 4. Receive audio chunks as JSON frames with base64-encoded audio.
|
|
48
|
+
# 5. A final frame with `isFinal: true` indicates the end of audio for the current
|
|
49
|
+
# text.
|
|
50
|
+
#
|
|
51
|
+
# To interrupt and restart synthesis mid-stream, send `{"force": true}` — the
|
|
52
|
+
# current worker is stopped and a new one is started.
|
|
53
|
+
#
|
|
54
|
+
# @overload stream(audio_format: nil, disable_cache: nil, model_id: nil, provider: nil, socket_id: nil, voice: nil, voice_id: nil, request_options: {})
|
|
55
|
+
#
|
|
56
|
+
# @param audio_format [Symbol, Telnyx::Models::TextToSpeechStreamParams::AudioFormat] Audio output format override. Supported for Telnyx `Natural`/`NaturalHD` models
|
|
57
|
+
#
|
|
58
|
+
# @param disable_cache [Boolean] When `true`, bypass the audio cache and generate fresh audio.
|
|
59
|
+
#
|
|
60
|
+
# @param model_id [String] Model identifier for the chosen provider. Examples: `Natural`, `NaturalHD` (Teln
|
|
61
|
+
#
|
|
62
|
+
# @param provider [Symbol, Telnyx::Models::TextToSpeechStreamParams::Provider] TTS provider. Defaults to `telnyx` if not specified. Ignored when `voice` is pro
|
|
63
|
+
#
|
|
64
|
+
# @param socket_id [String] Client-provided socket identifier for tracking. If not provided, one is generate
|
|
65
|
+
#
|
|
66
|
+
# @param voice [String] Voice identifier in the format `provider.model_id.voice_id` or `provider.voice_i
|
|
67
|
+
#
|
|
68
|
+
# @param voice_id [String] Voice identifier for the chosen provider.
|
|
42
69
|
#
|
|
43
70
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
44
71
|
#
|
|
45
|
-
# @return [
|
|
72
|
+
# @return [nil]
|
|
46
73
|
#
|
|
47
|
-
# @see Telnyx::Models::
|
|
48
|
-
def
|
|
49
|
-
parsed, options = Telnyx::
|
|
74
|
+
# @see Telnyx::Models::TextToSpeechStreamParams
|
|
75
|
+
def stream(params = {})
|
|
76
|
+
parsed, options = Telnyx::TextToSpeechStreamParams.dump_request(params)
|
|
50
77
|
@client.request(
|
|
51
78
|
method: :get,
|
|
52
|
-
path: "text-to-speech/
|
|
79
|
+
path: "text-to-speech/speech",
|
|
53
80
|
query: parsed,
|
|
54
|
-
model:
|
|
81
|
+
model: NilClass,
|
|
55
82
|
options: options
|
|
56
83
|
)
|
|
57
84
|
end
|
data/lib/telnyx/version.rb
CHANGED
data/lib/telnyx.rb
CHANGED
|
@@ -1677,11 +1677,11 @@ require_relative "telnyx/models/public_internet_gateway_retrieve_response"
|
|
|
1677
1677
|
require_relative "telnyx/models/push_credential"
|
|
1678
1678
|
require_relative "telnyx/models/push_credential_response"
|
|
1679
1679
|
require_relative "telnyx/models/pwg_assigned_resources_summary"
|
|
1680
|
+
require_relative "telnyx/models/queue"
|
|
1680
1681
|
require_relative "telnyx/models/queue_create_params"
|
|
1681
1682
|
require_relative "telnyx/models/queue_create_response"
|
|
1682
1683
|
require_relative "telnyx/models/queue_delete_params"
|
|
1683
1684
|
require_relative "telnyx/models/queue_list_params"
|
|
1684
|
-
require_relative "telnyx/models/queue_list_response"
|
|
1685
1685
|
require_relative "telnyx/models/queue_retrieve_params"
|
|
1686
1686
|
require_relative "telnyx/models/queue_retrieve_response"
|
|
1687
1687
|
require_relative "telnyx/models/queues/call_list_params"
|
|
@@ -2036,9 +2036,9 @@ require_relative "telnyx/models/texml_application_update_params"
|
|
|
2036
2036
|
require_relative "telnyx/models/texml_application_update_response"
|
|
2037
2037
|
require_relative "telnyx/models/texml_secrets_params"
|
|
2038
2038
|
require_relative "telnyx/models/texml_secrets_response"
|
|
2039
|
-
require_relative "telnyx/models/text_to_speech_generate_speech_params"
|
|
2040
2039
|
require_relative "telnyx/models/text_to_speech_list_voices_params"
|
|
2041
2040
|
require_relative "telnyx/models/text_to_speech_list_voices_response"
|
|
2041
|
+
require_relative "telnyx/models/text_to_speech_stream_params"
|
|
2042
2042
|
require_relative "telnyx/models/traffic_type"
|
|
2043
2043
|
require_relative "telnyx/models/transcription"
|
|
2044
2044
|
require_relative "telnyx/models/transcription_webhook_event"
|