Class: ActiveIntelligence::ASR::OpenAIAdapter
- Inherits:
-
Adapter
- Object
- ActiveIntelligence::Adapter
- Adapter
- ActiveIntelligence::ASR::OpenAIAdapter
- Includes:
- Concerns::OpenAI
- Defined in:
- lib/active_intelligence/asr/openai_adapter.rb
Instance Attribute Summary
Attributes inherited from ActiveIntelligence::Adapter
Instance Method Summary collapse
Methods inherited from Adapter
Methods inherited from ActiveIntelligence::Adapter
Constructor Details
This class inherits a constructor from ActiveIntelligence::Adapter
Instance Method Details
#transcribe(path, options = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/active_intelligence/asr/openai_adapter.rb', line 10 def transcribe(path, = {}) parameters = default_parameters.merge() parameters[:file] = File.open(path, 'rb') response = client.audio.transcribe(parameters:) return response['text'] end |