rime-api 0.2.0__tar.gz → 0.4.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rime-api
3
- Version: 0.2.0
3
+ Version: 0.4.0
4
4
  Summary: Generated protocol definitions for Rime text-to-speech and speech-to-text
5
5
  Project-URL: Documentation, https://docs.rime.ai
6
6
  Project-URL: Repository, https://github.com/rimelabs/rime-api
@@ -1,8 +1,8 @@
1
1
  {
2
- "version": "0.2.0",
2
+ "version": "0.4.0",
3
3
  "schemas": {
4
4
  "rime/speech_to_text.proto": "77131e17e7048cd989d547ff81c991151c23b896272b6bff903bd548eb8eb5b3",
5
- "rime/text_to_speech.proto": "6a5707f207c95fcb32557f4b811e30fb67c01df8fc4dc60ec823e592cc477e5e",
5
+ "rime/text_to_speech.proto": "964fb10df76a61b2ab89d0590f3f4922b49124bd3d12979a3790f65d837fe4e3",
6
6
  "speech_to_text.asyncapi.yaml": "604cb549319ff1bc7cc792d4a6df15dd8d9d75123397d57a3f31e8e5d93b71b6",
7
7
  "text_to_speech.asyncapi.yaml": "00e1223faf9858c278046bf774cf9f328606cfc336b02c71fdbf52c82a85ee35"
8
8
  }
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "rime-api"
7
- version = "0.2.0"
7
+ version = "0.4.0"
8
8
  description = "Generated protocol definitions for Rime text-to-speech and speech-to-text"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -60,6 +60,22 @@ message SynthesisRequest {
60
60
  // Timestamps of the spoken spans of the synthesized audio, delivered in
61
61
  // the trailer once the audio has drained. Off unless requested.
62
62
  optional TimestampOptions timestamps = 10;
63
+
64
+ // Per-request pronunciation overrides. Validated against the request
65
+ // language's phonology (an ill-formed entry fails the request) and applied by
66
+ // the segmenter and the pronunciation stages. See
67
+ // engine/src/pipeline/pronunciation.rs.
68
+ repeated PronunciationEntry custom_lexicon = 11;
69
+ }
70
+
71
+ // One custom-lexicon pronunciation override. The neural backend speaks
72
+ // `spelling` (matched case-insensitively as a whole word) using `pronunciation`
73
+ // wherever it occurs in the request text.
74
+ message PronunciationEntry {
75
+ // The word to override, e.g. "cache".
76
+ string spelling = 1;
77
+ // Its X-SAMPA pronunciation, e.g. `" k { S` (primary stress, then phones).
78
+ string pronunciation = 2;
63
79
  }
64
80
 
65
81
  message SynthesisResponseStream {
@@ -164,6 +180,10 @@ message NormalizeTextRequest {
164
180
 
165
181
  // BCP-47 language tag, e.g. "en".
166
182
  optional string language = 2;
183
+
184
+ // Per-request pronunciation overrides; same shape and validation as on
185
+ // SynthesisRequest.
186
+ repeated PronunciationEntry custom_lexicon = 3;
167
187
  }
168
188
 
169
189
  message NormalizeTextResponse {
@@ -0,0 +1,94 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: rime_api/text_to_speech.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'rime_api/text_to_speech.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
26
+ from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1drime_api/text_to_speech.proto\x12\x04rime\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\"s\n\x19StreamingSynthesisRequest\x12(\n\x06header\x18\x01 \x01(\x0b\x32\x16.rime.SynthesisRequestH\x00\x12\x14\n\ntext_chunk\x18\x02 \x01(\tH\x00\x42\t\n\x07payloadJ\x04\x08\x03\x10\x04R\x05\x66lush\"\x97\x04\n\x10SynthesisRequest\x12\x15\n\x08language\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07speaker\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04text\x18\x04 \x01(\t\x12\x34\n\x10\x61udio_parameters\x18\x05 \x01(\x0b\x32\x15.rime.AudioParametersH\x02\x88\x01\x01\x12\x30\n\x0esplit_strategy\x18\x06 \x01(\x0e\x32\x13.rime.SplitStrategyH\x03\x88\x01\x01\x12\x32\n\x0f\x63oda_parameters\x18\x08 \x01(\x0b\x32\x14.rime.CodaParametersH\x04\x88\x01\x01\x12\x32\n\x0fmist_parameters\x18\t \x01(\x0b\x32\x14.rime.MistParametersH\x05\x88\x01\x01\x12/\n\ntimestamps\x18\n \x01(\x0b\x32\x16.rime.TimestampOptionsH\x06\x88\x01\x01\x12\x30\n\x0e\x63ustom_lexicon\x18\x0b \x03(\x0b\x32\x18.rime.PronunciationEntryB\x0b\n\t_languageB\n\n\x08_speakerB\x13\n\x11_audio_parametersB\x11\n\x0f_split_strategyB\x12\n\x10_coda_parametersB\x12\n\x10_mist_parametersB\r\n\x0b_timestampsJ\x04\x08\x01\x10\x02J\x04\x08\x07\x10\x08R\x11\x61rcana_parameters\"=\n\x12PronunciationEntry\x12\x10\n\x08spelling\x18\x01 \x01(\t\x12\x15\n\rpronunciation\x18\x02 \x01(\t\"h\n\x17SynthesisResponseStream\x12\x0f\n\x05\x61udio\x18\x01 \x01(\x0cH\x00\x12\x31\n\x07trailer\x18\x02 \x01(\x0b\x32\x1e.rime.SynthesisResponseTrailerH\x00\x42\t\n\x07payload\"T\n\x18SynthesisResponseTrailer\x12)\n\ntimestamps\x18\x01 \x01(\x0b\x32\x10.rime.TimestampsH\x00\x88\x01\x01\x42\r\n\x0b_timestamps\"\xa1\x01\n\x0f\x41udioParameters\x12\x19\n\x0c\x61udio_format\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rsampling_rate\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x1e\n\x11time_scale_factor\x18\x03 \x01(\x02H\x02\x88\x01\x01\x42\x0f\n\r_audio_formatB\x10\n\x0e_sampling_rateB\x14\n\x12_time_scale_factor\"\xc5\x01\n\x0e\x43odaParameters\x12\"\n\x15text_lookahead_tokens\x18\x08 \x01(\x05H\x00\x88\x01\x01\x42\x18\n\x16_text_lookahead_tokensJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08R\x0btemperatureR\x05top_kR\x05top_pR\x12repetition_penaltyR\nmax_tokensR\nmin_tokensR\x04seed\"\xe1\x01\n\x0eMistParameters\x12#\n\x16pause_between_brackets\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1aphonemize_between_brackets\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12!\n\x19inline_time_scale_factors\x18\x03 \x03(\x02\x12\x16\n\tsave_oovs\x18\x04 \x01(\x08H\x02\x88\x01\x01\x42\x19\n\x17_pause_between_bracketsB\x1d\n\x1b_phonemize_between_bracketsB\x0c\n\n_save_oovs\"\"\n\x10TimestampOptions\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\"o\n\rSpanTimestamp\x12\x0c\n\x04text\x18\x01 \x01(\t\x12(\n\x05start\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"T\n\nTimestamps\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\"\n\x05spans\x18\x02 \x03(\x0b\x32\x13.rime.SpanTimestamp\"z\n\x14NormalizeTextRequest\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\x08language\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x30\n\x0e\x63ustom_lexicon\x18\x03 \x03(\x0b\x32\x18.rime.PronunciationEntryB\x0b\n\t_language\"N\n\x15NormalizeTextResponse\x12\x17\n\x0fnormalized_text\x18\x01 \x01(\t\x12\x1c\n\x14normalized_sentences\x18\x02 \x03(\t\"\x1e\n\x1cGetSupportedLanguagesRequest\"2\n\x1dGetSupportedLanguagesResponse\x12\x11\n\tlanguages\x18\x01 \x03(\t\"A\n\x1bGetSupportedSpeakersRequest\x12\x15\n\x08language\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_language\"0\n\x1cGetSupportedSpeakersResponse\x12\x10\n\x08speakers\x18\x01 \x03(\t\"\xec\x01\n\x10WebSocketRequest\x12\x12\n\ncontext_id\x18\x01 \x01(\t\x12\'\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.rime.WebSocketConfigH\x00\x12\'\n\x05start\x18\x03 \x01(\x0b\x32\x16.rime.SynthesisRequestH\x00\x12\x0e\n\x04text\x18\x04 \x01(\tH\x00\x12!\n\x03\x65nd\x18\x05 \x01(\x0b\x32\x12.rime.WebSocketEndH\x00\x12\'\n\x06\x63\x61ncel\x18\x06 \x01(\x0b\x32\x15.rime.WebSocketCancelH\x00\x42\t\n\x07payloadJ\x04\x08\x07\x10\x08R\x05\x66lush\"\x9d\x01\n\x0fWebSocketConfig\x12\x1a\n\rauthorization\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07license\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08\x64\x65\x66\x61ults\x18\x03 \x01(\x0b\x32\x16.rime.SynthesisRequestH\x02\x88\x01\x01\x42\x10\n\x0e_authorizationB\n\n\x08_licenseB\x0b\n\t_defaults\"\x0e\n\x0cWebSocketEnd\"\x11\n\x0fWebSocketCancel\"\x90\x02\n\x11WebSocketResponse\x12\x12\n\ncontext_id\x18\x01 \x01(\t\x12%\n\x05ready\x18\x02 \x01(\x0b\x32\x14.rime.WebSocketReadyH\x00\x12)\n\x07started\x18\x03 \x01(\x0b\x32\x16.rime.WebSocketStartedH\x00\x12\x0f\n\x05\x61udio\x18\x04 \x01(\x0cH\x00\x12#\n\x04\x64one\x18\x05 \x01(\x0b\x32\x13.rime.WebSocketDoneH\x00\x12-\n\tcancelled\x18\x06 \x01(\x0b\x32\x18.rime.WebSocketCancelledH\x00\x12%\n\x05\x65rror\x18\x07 \x01(\x0b\x32\x14.rime.WebSocketErrorH\x00\x42\t\n\x07payload\"i\n\x0eWebSocketReady\x12\x10\n\x08protocol\x18\x01 \x01(\r\x12\x11\n\tlanguages\x18\x02 \x03(\t\x12\x1d\n\x10\x64\x65\x66\x61ult_language\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_default_language\"&\n\x10WebSocketStarted\x12\x12\n\nrequest_id\x18\x01 \x01(\t\"I\n\rWebSocketDone\x12)\n\ntimestamps\x18\x01 \x01(\x0b\x32\x10.rime.TimestampsH\x00\x88\x01\x01\x42\r\n\x0b_timestamps\"\x14\n\x12WebSocketCancelled\"W\n\x0eWebSocketError\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x17\n\nrequest_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id*\x8d\x01\n\rSplitStrategy\x12\x1e\n\x1aSPLIT_STRATEGY_UNSPECIFIED\x10\x00\x12\x1b\n\x17SPLIT_STRATEGY_SENTENCE\x10\x01\x12\x17\n\x13SPLIT_STRATEGY_NONE\x10\x02\x12&\n\"SPLIT_STRATEGY_ACCUMULATE_SENTENCE\x10\x03\x32\xc5\x03\n\x0cTextToSpeech\x12G\n\nSynthesize\x12\x16.rime.SynthesisRequest\x1a\x1d.rime.SynthesisResponseStream\"\x00\x30\x01\x12[\n\x13SynthesizeStreaming\x12\x1f.rime.StreamingSynthesisRequest\x1a\x1d.rime.SynthesisResponseStream\"\x00(\x01\x30\x01\x12J\n\rNormalizeText\x12\x1a.rime.NormalizeTextRequest\x1a\x1b.rime.NormalizeTextResponse\"\x00\x12\x62\n\x15GetSupportedLanguages\x12\".rime.GetSupportedLanguagesRequest\x1a#.rime.GetSupportedLanguagesResponse\"\x00\x12_\n\x14GetSupportedSpeakers\x12!.rime.GetSupportedSpeakersRequest\x1a\".rime.GetSupportedSpeakersResponse\"\x00\x62\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'rime_api.text_to_speech_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ DESCRIPTOR._loaded_options = None
36
+ _globals['_SPLITSTRATEGY']._serialized_start=3281
37
+ _globals['_SPLITSTRATEGY']._serialized_end=3422
38
+ _globals['_STREAMINGSYNTHESISREQUEST']._serialized_start=96
39
+ _globals['_STREAMINGSYNTHESISREQUEST']._serialized_end=211
40
+ _globals['_SYNTHESISREQUEST']._serialized_start=214
41
+ _globals['_SYNTHESISREQUEST']._serialized_end=749
42
+ _globals['_PRONUNCIATIONENTRY']._serialized_start=751
43
+ _globals['_PRONUNCIATIONENTRY']._serialized_end=812
44
+ _globals['_SYNTHESISRESPONSESTREAM']._serialized_start=814
45
+ _globals['_SYNTHESISRESPONSESTREAM']._serialized_end=918
46
+ _globals['_SYNTHESISRESPONSETRAILER']._serialized_start=920
47
+ _globals['_SYNTHESISRESPONSETRAILER']._serialized_end=1004
48
+ _globals['_AUDIOPARAMETERS']._serialized_start=1007
49
+ _globals['_AUDIOPARAMETERS']._serialized_end=1168
50
+ _globals['_CODAPARAMETERS']._serialized_start=1171
51
+ _globals['_CODAPARAMETERS']._serialized_end=1368
52
+ _globals['_MISTPARAMETERS']._serialized_start=1371
53
+ _globals['_MISTPARAMETERS']._serialized_end=1596
54
+ _globals['_TIMESTAMPOPTIONS']._serialized_start=1598
55
+ _globals['_TIMESTAMPOPTIONS']._serialized_end=1632
56
+ _globals['_SPANTIMESTAMP']._serialized_start=1634
57
+ _globals['_SPANTIMESTAMP']._serialized_end=1745
58
+ _globals['_TIMESTAMPS']._serialized_start=1747
59
+ _globals['_TIMESTAMPS']._serialized_end=1831
60
+ _globals['_NORMALIZETEXTREQUEST']._serialized_start=1833
61
+ _globals['_NORMALIZETEXTREQUEST']._serialized_end=1955
62
+ _globals['_NORMALIZETEXTRESPONSE']._serialized_start=1957
63
+ _globals['_NORMALIZETEXTRESPONSE']._serialized_end=2035
64
+ _globals['_GETSUPPORTEDLANGUAGESREQUEST']._serialized_start=2037
65
+ _globals['_GETSUPPORTEDLANGUAGESREQUEST']._serialized_end=2067
66
+ _globals['_GETSUPPORTEDLANGUAGESRESPONSE']._serialized_start=2069
67
+ _globals['_GETSUPPORTEDLANGUAGESRESPONSE']._serialized_end=2119
68
+ _globals['_GETSUPPORTEDSPEAKERSREQUEST']._serialized_start=2121
69
+ _globals['_GETSUPPORTEDSPEAKERSREQUEST']._serialized_end=2186
70
+ _globals['_GETSUPPORTEDSPEAKERSRESPONSE']._serialized_start=2188
71
+ _globals['_GETSUPPORTEDSPEAKERSRESPONSE']._serialized_end=2236
72
+ _globals['_WEBSOCKETREQUEST']._serialized_start=2239
73
+ _globals['_WEBSOCKETREQUEST']._serialized_end=2475
74
+ _globals['_WEBSOCKETCONFIG']._serialized_start=2478
75
+ _globals['_WEBSOCKETCONFIG']._serialized_end=2635
76
+ _globals['_WEBSOCKETEND']._serialized_start=2637
77
+ _globals['_WEBSOCKETEND']._serialized_end=2651
78
+ _globals['_WEBSOCKETCANCEL']._serialized_start=2653
79
+ _globals['_WEBSOCKETCANCEL']._serialized_end=2670
80
+ _globals['_WEBSOCKETRESPONSE']._serialized_start=2673
81
+ _globals['_WEBSOCKETRESPONSE']._serialized_end=2945
82
+ _globals['_WEBSOCKETREADY']._serialized_start=2947
83
+ _globals['_WEBSOCKETREADY']._serialized_end=3052
84
+ _globals['_WEBSOCKETSTARTED']._serialized_start=3054
85
+ _globals['_WEBSOCKETSTARTED']._serialized_end=3092
86
+ _globals['_WEBSOCKETDONE']._serialized_start=3094
87
+ _globals['_WEBSOCKETDONE']._serialized_end=3167
88
+ _globals['_WEBSOCKETCANCELLED']._serialized_start=3169
89
+ _globals['_WEBSOCKETCANCELLED']._serialized_end=3189
90
+ _globals['_WEBSOCKETERROR']._serialized_start=3191
91
+ _globals['_WEBSOCKETERROR']._serialized_end=3278
92
+ _globals['_TEXTTOSPEECH']._serialized_start=3425
93
+ _globals['_TEXTTOSPEECH']._serialized_end=3878
94
+ # @@protoc_insertion_point(module_scope)
@@ -28,7 +28,7 @@ class StreamingSynthesisRequest(_message.Message):
28
28
  def __init__(self, header: _Optional[_Union[SynthesisRequest, _Mapping]] = ..., text_chunk: _Optional[str] = ...) -> None: ...
29
29
 
30
30
  class SynthesisRequest(_message.Message):
31
- __slots__ = ("language", "speaker", "text", "audio_parameters", "split_strategy", "coda_parameters", "mist_parameters", "timestamps")
31
+ __slots__ = ("language", "speaker", "text", "audio_parameters", "split_strategy", "coda_parameters", "mist_parameters", "timestamps", "custom_lexicon")
32
32
  LANGUAGE_FIELD_NUMBER: _ClassVar[int]
33
33
  SPEAKER_FIELD_NUMBER: _ClassVar[int]
34
34
  TEXT_FIELD_NUMBER: _ClassVar[int]
@@ -37,6 +37,7 @@ class SynthesisRequest(_message.Message):
37
37
  CODA_PARAMETERS_FIELD_NUMBER: _ClassVar[int]
38
38
  MIST_PARAMETERS_FIELD_NUMBER: _ClassVar[int]
39
39
  TIMESTAMPS_FIELD_NUMBER: _ClassVar[int]
40
+ CUSTOM_LEXICON_FIELD_NUMBER: _ClassVar[int]
40
41
  language: str
41
42
  speaker: str
42
43
  text: str
@@ -45,7 +46,16 @@ class SynthesisRequest(_message.Message):
45
46
  coda_parameters: CodaParameters
46
47
  mist_parameters: MistParameters
47
48
  timestamps: TimestampOptions
48
- def __init__(self, language: _Optional[str] = ..., speaker: _Optional[str] = ..., text: _Optional[str] = ..., audio_parameters: _Optional[_Union[AudioParameters, _Mapping]] = ..., split_strategy: _Optional[_Union[SplitStrategy, str]] = ..., coda_parameters: _Optional[_Union[CodaParameters, _Mapping]] = ..., mist_parameters: _Optional[_Union[MistParameters, _Mapping]] = ..., timestamps: _Optional[_Union[TimestampOptions, _Mapping]] = ...) -> None: ...
49
+ custom_lexicon: _containers.RepeatedCompositeFieldContainer[PronunciationEntry]
50
+ def __init__(self, language: _Optional[str] = ..., speaker: _Optional[str] = ..., text: _Optional[str] = ..., audio_parameters: _Optional[_Union[AudioParameters, _Mapping]] = ..., split_strategy: _Optional[_Union[SplitStrategy, str]] = ..., coda_parameters: _Optional[_Union[CodaParameters, _Mapping]] = ..., mist_parameters: _Optional[_Union[MistParameters, _Mapping]] = ..., timestamps: _Optional[_Union[TimestampOptions, _Mapping]] = ..., custom_lexicon: _Optional[_Iterable[_Union[PronunciationEntry, _Mapping]]] = ...) -> None: ...
51
+
52
+ class PronunciationEntry(_message.Message):
53
+ __slots__ = ("spelling", "pronunciation")
54
+ SPELLING_FIELD_NUMBER: _ClassVar[int]
55
+ PRONUNCIATION_FIELD_NUMBER: _ClassVar[int]
56
+ spelling: str
57
+ pronunciation: str
58
+ def __init__(self, spelling: _Optional[str] = ..., pronunciation: _Optional[str] = ...) -> None: ...
49
59
 
50
60
  class SynthesisResponseStream(_message.Message):
51
61
  __slots__ = ("audio", "trailer")
@@ -114,12 +124,14 @@ class Timestamps(_message.Message):
114
124
  def __init__(self, status: _Optional[_Union[_status_pb2.Status, _Mapping]] = ..., spans: _Optional[_Iterable[_Union[SpanTimestamp, _Mapping]]] = ...) -> None: ...
115
125
 
116
126
  class NormalizeTextRequest(_message.Message):
117
- __slots__ = ("text", "language")
127
+ __slots__ = ("text", "language", "custom_lexicon")
118
128
  TEXT_FIELD_NUMBER: _ClassVar[int]
119
129
  LANGUAGE_FIELD_NUMBER: _ClassVar[int]
130
+ CUSTOM_LEXICON_FIELD_NUMBER: _ClassVar[int]
120
131
  text: str
121
132
  language: str
122
- def __init__(self, text: _Optional[str] = ..., language: _Optional[str] = ...) -> None: ...
133
+ custom_lexicon: _containers.RepeatedCompositeFieldContainer[PronunciationEntry]
134
+ def __init__(self, text: _Optional[str] = ..., language: _Optional[str] = ..., custom_lexicon: _Optional[_Iterable[_Union[PronunciationEntry, _Mapping]]] = ...) -> None: ...
123
135
 
124
136
  class NormalizeTextResponse(_message.Message):
125
137
  __slots__ = ("normalized_text", "normalized_sentences")
@@ -1,92 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: rime_api/text_to_speech.proto
5
- # Protobuf Python Version: 5.29.0
6
- """Generated protocol buffer code."""
7
- from google.protobuf import descriptor as _descriptor
8
- from google.protobuf import descriptor_pool as _descriptor_pool
9
- from google.protobuf import runtime_version as _runtime_version
10
- from google.protobuf import symbol_database as _symbol_database
11
- from google.protobuf.internal import builder as _builder
12
- _runtime_version.ValidateProtobufRuntimeVersion(
13
- _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 0,
17
- '',
18
- 'rime_api/text_to_speech.proto'
19
- )
20
- # @@protoc_insertion_point(imports)
21
-
22
- _sym_db = _symbol_database.Default()
23
-
24
-
25
- from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
26
- from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
27
-
28
-
29
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1drime_api/text_to_speech.proto\x12\x04rime\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\"s\n\x19StreamingSynthesisRequest\x12(\n\x06header\x18\x01 \x01(\x0b\x32\x16.rime.SynthesisRequestH\x00\x12\x14\n\ntext_chunk\x18\x02 \x01(\tH\x00\x42\t\n\x07payloadJ\x04\x08\x03\x10\x04R\x05\x66lush\"\xe5\x03\n\x10SynthesisRequest\x12\x15\n\x08language\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07speaker\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04text\x18\x04 \x01(\t\x12\x34\n\x10\x61udio_parameters\x18\x05 \x01(\x0b\x32\x15.rime.AudioParametersH\x02\x88\x01\x01\x12\x30\n\x0esplit_strategy\x18\x06 \x01(\x0e\x32\x13.rime.SplitStrategyH\x03\x88\x01\x01\x12\x32\n\x0f\x63oda_parameters\x18\x08 \x01(\x0b\x32\x14.rime.CodaParametersH\x04\x88\x01\x01\x12\x32\n\x0fmist_parameters\x18\t \x01(\x0b\x32\x14.rime.MistParametersH\x05\x88\x01\x01\x12/\n\ntimestamps\x18\n \x01(\x0b\x32\x16.rime.TimestampOptionsH\x06\x88\x01\x01\x42\x0b\n\t_languageB\n\n\x08_speakerB\x13\n\x11_audio_parametersB\x11\n\x0f_split_strategyB\x12\n\x10_coda_parametersB\x12\n\x10_mist_parametersB\r\n\x0b_timestampsJ\x04\x08\x01\x10\x02J\x04\x08\x07\x10\x08R\x11\x61rcana_parameters\"h\n\x17SynthesisResponseStream\x12\x0f\n\x05\x61udio\x18\x01 \x01(\x0cH\x00\x12\x31\n\x07trailer\x18\x02 \x01(\x0b\x32\x1e.rime.SynthesisResponseTrailerH\x00\x42\t\n\x07payload\"T\n\x18SynthesisResponseTrailer\x12)\n\ntimestamps\x18\x01 \x01(\x0b\x32\x10.rime.TimestampsH\x00\x88\x01\x01\x42\r\n\x0b_timestamps\"\xa1\x01\n\x0f\x41udioParameters\x12\x19\n\x0c\x61udio_format\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rsampling_rate\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x1e\n\x11time_scale_factor\x18\x03 \x01(\x02H\x02\x88\x01\x01\x42\x0f\n\r_audio_formatB\x10\n\x0e_sampling_rateB\x14\n\x12_time_scale_factor\"\xc5\x01\n\x0e\x43odaParameters\x12\"\n\x15text_lookahead_tokens\x18\x08 \x01(\x05H\x00\x88\x01\x01\x42\x18\n\x16_text_lookahead_tokensJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08R\x0btemperatureR\x05top_kR\x05top_pR\x12repetition_penaltyR\nmax_tokensR\nmin_tokensR\x04seed\"\xe1\x01\n\x0eMistParameters\x12#\n\x16pause_between_brackets\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1aphonemize_between_brackets\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12!\n\x19inline_time_scale_factors\x18\x03 \x03(\x02\x12\x16\n\tsave_oovs\x18\x04 \x01(\x08H\x02\x88\x01\x01\x42\x19\n\x17_pause_between_bracketsB\x1d\n\x1b_phonemize_between_bracketsB\x0c\n\n_save_oovs\"\"\n\x10TimestampOptions\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\"o\n\rSpanTimestamp\x12\x0c\n\x04text\x18\x01 \x01(\t\x12(\n\x05start\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"T\n\nTimestamps\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\"\n\x05spans\x18\x02 \x03(\x0b\x32\x13.rime.SpanTimestamp\"H\n\x14NormalizeTextRequest\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\x08language\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_language\"N\n\x15NormalizeTextResponse\x12\x17\n\x0fnormalized_text\x18\x01 \x01(\t\x12\x1c\n\x14normalized_sentences\x18\x02 \x03(\t\"\x1e\n\x1cGetSupportedLanguagesRequest\"2\n\x1dGetSupportedLanguagesResponse\x12\x11\n\tlanguages\x18\x01 \x03(\t\"A\n\x1bGetSupportedSpeakersRequest\x12\x15\n\x08language\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_language\"0\n\x1cGetSupportedSpeakersResponse\x12\x10\n\x08speakers\x18\x01 \x03(\t\"\xec\x01\n\x10WebSocketRequest\x12\x12\n\ncontext_id\x18\x01 \x01(\t\x12\'\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.rime.WebSocketConfigH\x00\x12\'\n\x05start\x18\x03 \x01(\x0b\x32\x16.rime.SynthesisRequestH\x00\x12\x0e\n\x04text\x18\x04 \x01(\tH\x00\x12!\n\x03\x65nd\x18\x05 \x01(\x0b\x32\x12.rime.WebSocketEndH\x00\x12\'\n\x06\x63\x61ncel\x18\x06 \x01(\x0b\x32\x15.rime.WebSocketCancelH\x00\x42\t\n\x07payloadJ\x04\x08\x07\x10\x08R\x05\x66lush\"\x9d\x01\n\x0fWebSocketConfig\x12\x1a\n\rauthorization\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07license\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08\x64\x65\x66\x61ults\x18\x03 \x01(\x0b\x32\x16.rime.SynthesisRequestH\x02\x88\x01\x01\x42\x10\n\x0e_authorizationB\n\n\x08_licenseB\x0b\n\t_defaults\"\x0e\n\x0cWebSocketEnd\"\x11\n\x0fWebSocketCancel\"\x90\x02\n\x11WebSocketResponse\x12\x12\n\ncontext_id\x18\x01 \x01(\t\x12%\n\x05ready\x18\x02 \x01(\x0b\x32\x14.rime.WebSocketReadyH\x00\x12)\n\x07started\x18\x03 \x01(\x0b\x32\x16.rime.WebSocketStartedH\x00\x12\x0f\n\x05\x61udio\x18\x04 \x01(\x0cH\x00\x12#\n\x04\x64one\x18\x05 \x01(\x0b\x32\x13.rime.WebSocketDoneH\x00\x12-\n\tcancelled\x18\x06 \x01(\x0b\x32\x18.rime.WebSocketCancelledH\x00\x12%\n\x05\x65rror\x18\x07 \x01(\x0b\x32\x14.rime.WebSocketErrorH\x00\x42\t\n\x07payload\"i\n\x0eWebSocketReady\x12\x10\n\x08protocol\x18\x01 \x01(\r\x12\x11\n\tlanguages\x18\x02 \x03(\t\x12\x1d\n\x10\x64\x65\x66\x61ult_language\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_default_language\"&\n\x10WebSocketStarted\x12\x12\n\nrequest_id\x18\x01 \x01(\t\"I\n\rWebSocketDone\x12)\n\ntimestamps\x18\x01 \x01(\x0b\x32\x10.rime.TimestampsH\x00\x88\x01\x01\x42\r\n\x0b_timestamps\"\x14\n\x12WebSocketCancelled\"W\n\x0eWebSocketError\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x17\n\nrequest_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id*\x8d\x01\n\rSplitStrategy\x12\x1e\n\x1aSPLIT_STRATEGY_UNSPECIFIED\x10\x00\x12\x1b\n\x17SPLIT_STRATEGY_SENTENCE\x10\x01\x12\x17\n\x13SPLIT_STRATEGY_NONE\x10\x02\x12&\n\"SPLIT_STRATEGY_ACCUMULATE_SENTENCE\x10\x03\x32\xc5\x03\n\x0cTextToSpeech\x12G\n\nSynthesize\x12\x16.rime.SynthesisRequest\x1a\x1d.rime.SynthesisResponseStream\"\x00\x30\x01\x12[\n\x13SynthesizeStreaming\x12\x1f.rime.StreamingSynthesisRequest\x1a\x1d.rime.SynthesisResponseStream\"\x00(\x01\x30\x01\x12J\n\rNormalizeText\x12\x1a.rime.NormalizeTextRequest\x1a\x1b.rime.NormalizeTextResponse\"\x00\x12\x62\n\x15GetSupportedLanguages\x12\".rime.GetSupportedLanguagesRequest\x1a#.rime.GetSupportedLanguagesResponse\"\x00\x12_\n\x14GetSupportedSpeakers\x12!.rime.GetSupportedSpeakersRequest\x1a\".rime.GetSupportedSpeakersResponse\"\x00\x62\x06proto3')
30
-
31
- _globals = globals()
32
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'rime_api.text_to_speech_pb2', _globals)
34
- if not _descriptor._USE_C_DESCRIPTORS:
35
- DESCRIPTOR._loaded_options = None
36
- _globals['_SPLITSTRATEGY']._serialized_start=3118
37
- _globals['_SPLITSTRATEGY']._serialized_end=3259
38
- _globals['_STREAMINGSYNTHESISREQUEST']._serialized_start=96
39
- _globals['_STREAMINGSYNTHESISREQUEST']._serialized_end=211
40
- _globals['_SYNTHESISREQUEST']._serialized_start=214
41
- _globals['_SYNTHESISREQUEST']._serialized_end=699
42
- _globals['_SYNTHESISRESPONSESTREAM']._serialized_start=701
43
- _globals['_SYNTHESISRESPONSESTREAM']._serialized_end=805
44
- _globals['_SYNTHESISRESPONSETRAILER']._serialized_start=807
45
- _globals['_SYNTHESISRESPONSETRAILER']._serialized_end=891
46
- _globals['_AUDIOPARAMETERS']._serialized_start=894
47
- _globals['_AUDIOPARAMETERS']._serialized_end=1055
48
- _globals['_CODAPARAMETERS']._serialized_start=1058
49
- _globals['_CODAPARAMETERS']._serialized_end=1255
50
- _globals['_MISTPARAMETERS']._serialized_start=1258
51
- _globals['_MISTPARAMETERS']._serialized_end=1483
52
- _globals['_TIMESTAMPOPTIONS']._serialized_start=1485
53
- _globals['_TIMESTAMPOPTIONS']._serialized_end=1519
54
- _globals['_SPANTIMESTAMP']._serialized_start=1521
55
- _globals['_SPANTIMESTAMP']._serialized_end=1632
56
- _globals['_TIMESTAMPS']._serialized_start=1634
57
- _globals['_TIMESTAMPS']._serialized_end=1718
58
- _globals['_NORMALIZETEXTREQUEST']._serialized_start=1720
59
- _globals['_NORMALIZETEXTREQUEST']._serialized_end=1792
60
- _globals['_NORMALIZETEXTRESPONSE']._serialized_start=1794
61
- _globals['_NORMALIZETEXTRESPONSE']._serialized_end=1872
62
- _globals['_GETSUPPORTEDLANGUAGESREQUEST']._serialized_start=1874
63
- _globals['_GETSUPPORTEDLANGUAGESREQUEST']._serialized_end=1904
64
- _globals['_GETSUPPORTEDLANGUAGESRESPONSE']._serialized_start=1906
65
- _globals['_GETSUPPORTEDLANGUAGESRESPONSE']._serialized_end=1956
66
- _globals['_GETSUPPORTEDSPEAKERSREQUEST']._serialized_start=1958
67
- _globals['_GETSUPPORTEDSPEAKERSREQUEST']._serialized_end=2023
68
- _globals['_GETSUPPORTEDSPEAKERSRESPONSE']._serialized_start=2025
69
- _globals['_GETSUPPORTEDSPEAKERSRESPONSE']._serialized_end=2073
70
- _globals['_WEBSOCKETREQUEST']._serialized_start=2076
71
- _globals['_WEBSOCKETREQUEST']._serialized_end=2312
72
- _globals['_WEBSOCKETCONFIG']._serialized_start=2315
73
- _globals['_WEBSOCKETCONFIG']._serialized_end=2472
74
- _globals['_WEBSOCKETEND']._serialized_start=2474
75
- _globals['_WEBSOCKETEND']._serialized_end=2488
76
- _globals['_WEBSOCKETCANCEL']._serialized_start=2490
77
- _globals['_WEBSOCKETCANCEL']._serialized_end=2507
78
- _globals['_WEBSOCKETRESPONSE']._serialized_start=2510
79
- _globals['_WEBSOCKETRESPONSE']._serialized_end=2782
80
- _globals['_WEBSOCKETREADY']._serialized_start=2784
81
- _globals['_WEBSOCKETREADY']._serialized_end=2889
82
- _globals['_WEBSOCKETSTARTED']._serialized_start=2891
83
- _globals['_WEBSOCKETSTARTED']._serialized_end=2929
84
- _globals['_WEBSOCKETDONE']._serialized_start=2931
85
- _globals['_WEBSOCKETDONE']._serialized_end=3004
86
- _globals['_WEBSOCKETCANCELLED']._serialized_start=3006
87
- _globals['_WEBSOCKETCANCELLED']._serialized_end=3026
88
- _globals['_WEBSOCKETERROR']._serialized_start=3028
89
- _globals['_WEBSOCKETERROR']._serialized_end=3115
90
- _globals['_TEXTTOSPEECH']._serialized_start=3262
91
- _globals['_TEXTTOSPEECH']._serialized_end=3715
92
- # @@protoc_insertion_point(module_scope)
File without changes
File without changes
File without changes
File without changes
File without changes