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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9aa6adb553c3bb4ee1c6463b1d5654d4e9deb01044ee3e5e3974cb9fc762e2c
4
- data.tar.gz: 3d2347a9ca7a198bc96b93afc670b1283fd9f871ff73de35ea5c8d0a6c78d56b
3
+ metadata.gz: 7a72db6a7c7cf0bf217587a4bbc6fe898b0135bca9d17741da1efe4e986b0779
4
+ data.tar.gz: 457e59ec6fae1987ee136382ce336f67030b833dbb387f4e042e01d4a1391b92
5
5
  SHA512:
6
- metadata.gz: d671369f7115e0b63193aa47815bd4552c2a375b8719c7585f376cd01e79f5b8dcfc163d8e910e75426146c011a7e3d74d3ae1994a38b9120d2eda3ab866a9bb
7
- data.tar.gz: 0124e71067ecde28627f775ff4c27781d72a223a081163404a2fa0c67d1c890455c409baf7793a629f4158c9d85bd828eb971000ca4d431a31c9f01165eb2a81
6
+ metadata.gz: 021313314cbe8160a738a86e5d85ad81b4068b344a6090bc82812e4c823b2ac626c34c72ec22c3885f5e045046fb5ce0104bbe02f183bd2874bf2d1531e770d1
7
+ data.tar.gz: b1aa2fe850b46cda6f4032dea35fd28c9e9c78ed86785cfb6cdc3befd373df82119a5d40b9c301a1ca7255a202e6cad1a4a761818ff6d4cd66d7864bf6ae8789
@@ -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::Model::WHISPER, language: nil, prompt: nil, temperature: nil, format: nil)
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::Model::TTS_1_HD, voice: Speak::Voice::ALLOY, speed: nil, format: nil, &)
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
 
@@ -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]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAI
4
4
  module OpenAI
5
- VERSION = "2.0.1"
5
+ VERSION = "2.0.2"
6
6
  end
7
7
  end
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.1
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 00:00:00.000000000 Z
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