omniai-openai 2.0.1 → 2.0.2
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/lib/omniai/openai/client.rb +2 -2
- data/lib/omniai/openai/speak.rb +8 -0
- data/lib/omniai/openai/transcribe.rb +4 -0
- data/lib/omniai/openai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a72db6a7c7cf0bf217587a4bbc6fe898b0135bca9d17741da1efe4e986b0779
|
4
|
+
data.tar.gz: 457e59ec6fae1987ee136382ce336f67030b833dbb387f4e042e01d4a1391b92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 021313314cbe8160a738a86e5d85ad81b4068b344a6090bc82812e4c823b2ac626c34c72ec22c3885f5e045046fb5ce0104bbe02f183bd2874bf2d1531e770d1
|
7
|
+
data.tar.gz: b1aa2fe850b46cda6f4032dea35fd28c9e9c78ed86785cfb6cdc3befd373df82119a5d40b9c301a1ca7255a202e6cad1a4a761818ff6d4cd66d7864bf6ae8789
|
data/lib/omniai/openai/client.rb
CHANGED
@@ -104,7 +104,7 @@ module OmniAI
|
|
104
104
|
# @param format [Symbol] :text, :srt, :vtt, or :json (default)
|
105
105
|
#
|
106
106
|
# @return [OmniAI::Transcribe]
|
107
|
-
def transcribe(path, model: Transcribe::
|
107
|
+
def transcribe(path, model: Transcribe::DEFAULT_MODEL, language: nil, prompt: nil, temperature: nil, format: nil)
|
108
108
|
Transcribe.process!(path, model:, language:, prompt:, temperature:, format:, client: self)
|
109
109
|
end
|
110
110
|
|
@@ -125,7 +125,7 @@ module OmniAI
|
|
125
125
|
# @yield [output] optional
|
126
126
|
#
|
127
127
|
# @return [Tempfile``]
|
128
|
-
def speak(input, model: Speak::
|
128
|
+
def speak(input, model: Speak::DEFAULT_MODEL, voice: Speak::DEFAULT_VOICE, speed: nil, format: nil, &)
|
129
129
|
Speak.process!(input, model:, voice:, speed:, format:, client: self, &)
|
130
130
|
end
|
131
131
|
|
data/lib/omniai/openai/speak.rb
CHANGED
@@ -7,17 +7,25 @@ module OmniAI
|
|
7
7
|
module Model
|
8
8
|
TTS_1 = "tts-1"
|
9
9
|
TTS_1_HD = "tts-1-hd"
|
10
|
+
GPT_4O_MINI_TTS = "gpt-4o-mini-tts"
|
10
11
|
end
|
11
12
|
|
12
13
|
module Voice
|
13
14
|
ALLOY = "alloy" # https://platform.openai.com/docs/guides/text-to-speech/alloy
|
15
|
+
ASH = "ash" # https://platform.openai.com/docs/guides/text-to-speech/ash
|
16
|
+
BALLARD = "ballard" # https://platform.openai.com/docs/guides/text-to-speech/ballard
|
17
|
+
CORAL = "coral" # https://platform.openai.com/docs/guides/text-to-speech/coral
|
14
18
|
ECHO = "echo" # https://platform.openai.com/docs/guides/text-to-speech/echo
|
15
19
|
FABLE = "fable" # https://platform.openai.com/docs/guides/text-to-speech/fable
|
16
20
|
NOVA = "nova" # https://platform.openai.com/docs/guides/text-to-speech/nova
|
17
21
|
ONYX = "onyx" # https://platform.openai.com/docs/guides/text-to-speech/onyx
|
22
|
+
SAGE = "sage" # https://platform.openai.com/docs/guides/text-to-speech/sage
|
18
23
|
SHIMMER = "shimmer" # https://platform.openai.com/docs/guides/text-to-speech/shimmer
|
19
24
|
end
|
20
25
|
|
26
|
+
DEFAULT_MODEL = Model::GPT_4O_MINI_TTS
|
27
|
+
DEFAULT_VOICE = Voice::ALLOY
|
28
|
+
|
21
29
|
protected
|
22
30
|
|
23
31
|
# @return [Hash]
|
@@ -6,9 +6,13 @@ module OmniAI
|
|
6
6
|
class Transcribe < OmniAI::Transcribe
|
7
7
|
module Model
|
8
8
|
WHISPER_1 = "whisper-1"
|
9
|
+
GPT_4O_TRANSCRIBE = "gpt-4o-transcribe"
|
10
|
+
GPT_4O_MINI_TRANSCRIBE = "gpt-4-0-mini-transcribe"
|
9
11
|
WHISPER = WHISPER_1
|
10
12
|
end
|
11
13
|
|
14
|
+
DEFAULT_MODEL = Model::WHISPER
|
15
|
+
|
12
16
|
protected
|
13
17
|
|
14
18
|
# @return [Hash]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniai-openai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Sylvestre
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-21 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: event_stream_parser
|