Method: Deepgram::Read::Client#analyze
- Defined in:
- lib/deepgram/read.rb
#analyze(text:, **kwargs) ⇒ Deepgram::Read::Response
Sends a POST request to analyze text using the Deepgram Read API. Returns a Response object containing the analysis results.
27 28 29 30 31 32 33 |
# File 'lib/deepgram/read.rb', line 27 def analyze(text:, **kwargs) res = request(:post, **kwargs) do |request| request.body = JSON.generate(text: text) end Response.new(status: res.status, body: res.body, headers: res.headers) end |