This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-26
Channels
- # bangalore-clj (1)
- # beginners (12)
- # boot (48)
- # cider (56)
- # clara (1)
- # cljs-dev (15)
- # clojure (455)
- # clojure-austin (2)
- # clojure-dev (33)
- # clojure-italy (26)
- # clojure-nl (6)
- # clojure-poland (10)
- # clojure-russia (23)
- # clojure-spec (33)
- # clojure-uk (62)
- # clojurescript (37)
- # code-art (2)
- # cursive (12)
- # datomic (48)
- # funcool (1)
- # juxt (16)
- # leiningen (13)
- # off-topic (12)
- # om (23)
- # onyx (16)
- # other-lisps (5)
- # parinfer (2)
- # pedestal (28)
- # re-frame (60)
- # reagent (8)
- # ring (1)
- # ring-swagger (15)
- # spacemacs (5)
- # specter (53)
- # test-check (2)
- # unrepl (8)
- # vim (14)
Hi, i’m not sure this is lein problem, but in our CI in docker we are getting Exception in thread "main" java.io.FileNotFoundException: /tmp/form-init5758952
in absolutely random places - deps, uberjar, test … ?
Would appreciate any help to figure out what I'm doing worng here.
lein run
WARNING!!! version ranges found for:
[com.google.cloud/google-cloud-speech "0.17.1-alpha"] -> [io.grpc/grpc-netty "1.2.0"] -> [io.grpc/grpc-core "[1.2.0,1.2.0]"]
Consider using [com.google.cloud/google-cloud-speech "0.17.1-alpha" :exclusions [io.grpc/grpc-core]].
[com.google.cloud/google-cloud-speech "0.17.1-alpha"] -> [io.grpc/grpc-netty "1.2.0"] -> [io.netty/netty-codec-http2 "[4.1.8.Final,4.1.8.Final]"]
Consider using [com.google.cloud/google-cloud-speech "0.17.1-alpha" :exclusions [io.netty/netty-codec-http2]].
[com.google.cloud/google-cloud-speech "0.17.1-alpha"] -> [io.grpc/grpc-auth "1.2.0"] -> [io.grpc/grpc-core "[1.2.0,1.2.0]"]
Consider using [com.google.cloud/google-cloud-speech "0.17.1-alpha" :exclusions [io.grpc/grpc-core]].
[com.google.cloud/google-cloud-speech "0.17.1-alpha"] -> [com.google.cloud/google-cloud-core-grpc "1.0.0"] -> [com.google.api/gax-grpc "0.16.0"] -> [io.grpc/grpc-netty "1.2.0" :exclusions [com.google.guava/guava-jdk5]] -> [io.grpc/grpc-core "[1.2.0,1.2.0]"]
Consider using [com.google.cloud/google-cloud-speech "0.17.1-alpha" :exclusions [io.grpc/grpc-core]].
[com.google.cloud/google-cloud-speech "0.17.1-alpha"] -> [com.google.cloud/google-cloud-core-grpc "1.0.0"] -> [com.google.api/gax-grpc "0.16.0"] -> [io.grpc/grpc-netty "1.2.0" :exclusions [com.google.guava/guava-jdk5]] -> [io.netty/netty-codec-http2 "[4.1.8.Final,4.1.8.Final]"]
Consider using [com.google.cloud/google-cloud-speech "0.17.1-alpha" :exclusions [io.netty/netty-codec-http2]].
[com.google.cloud/google-cloud-speech "0.17.1-alpha"] -> [com.google.cloud/google-cloud-core-grpc "1.0.0"] -> [com.google.api/gax-grpc "0.16.0"] -> [io.grpc/grpc-auth "1.2.0" :exclusions [com.google.guava/guava-jdk5]] -> [io.grpc/grpc-core "[1.2.0,1.2.0]"]
Consider using [com.google.cloud/google-cloud-speech "0.17.1-alpha" :exclusions [io.grpc/grpc-core]].
Exception in thread "main" java.lang.ClassNotFoundException: com.google.cloud.speech.v1.SpeechClient, compiling:(callj/core.clj:1:1)
The project.clj is
(defproject callj "0.1.0-SNAPSHOT"
:description "Transcription of phone calls."
:url ""
:dependencies [[org.clojure/clojure "1.8.0"]
[com.google.cloud/google-cloud-speech "0.17.1-alpha"]
]
:main callj.core
)
And the core.clj file is
(ns callj.core
(:import (com.google.cloud.speech.v1
RecognitionAudio
RecognitionConfig
RecognizeResponse
SpeechClient
SpeechRecognitionAlternative
SpeechRecognitionResult)
(com.google.protobuf ByteString)
(java.nio.file Files Path Paths)
)
)
(defn doexample
[filename]
(let [speech (SpeechClient/create)
path (Files/get filename)
data (Files/readAllBytes path)
audiobytes (ByteString/copyFrom data)
config (doto (RecognitionConfig/newBuilder)
(.setEncoding RecognitionConfig$AudioEncoding/FLAC)
(.setSampleRateHertz 8000)
(.setlanguageCode "en-US")
(.build))
audio (doto (RecognitionAudio/newBuilder)
(.setContent audiobytes)
(.build))
;;
response (.recognize speech config audio)
results (.getResultsList response)]
(doseq [result results]
(doseq [alternative (.getAlternativesList result)]
(println "Transcription:" (.getTranscript alternative))))
(.close speech)))
(defn -main
"Run example."
[& args]
(let [filename "./data/1888405886.flac"]
(doexample filename)
))
This might be related to https://github.com/technomancy/leiningen/issues/2215
Oops that should be https://github.com/technomancy/leiningen/issues/2251
@dorab have you tried using the suggested exclusions?
Here's what I used when I was using Spanner:
;; Google
[com.google.cloud/google-cloud-spanner "0.11.0-beta"
:exclusions [com.google.guava/guava-jdk5
;; Delete these two auth exclusions once a new version of cloud-spanner is out that includes
;;
com.google.auth/google-auth-library-credentials
com.google.auth/google-auth-library-oauth2-http]]
[com.google.cloud/google-cloud-storage "0.11.0-beta"
:exclusions [com.google.guava/guava-jdk5]]
[com.google.guava/guava "19.0"]
[com.google.auth/google-auth-library-credentials "0.6.0"]
[com.google.auth/google-auth-library-oauth2-http "0.6.0"]
The following in my project.clj makes the warnings go away
(defproject callj "0.1.0-SNAPSHOT"
:description "Transcription of phone calls."
:url ""
:dependencies [[org.clojure/clojure "1.8.0"]
;; [com.google.cloud/google-cloud-speech "0.17.1-alpha"]
[com.google.cloud/google-cloud-speech "0.17.1-alpha" :exclusions [io.grpc/grpc-core io.netty/netty-codec-http2]]
[io.grpc/grpc-core "1.2.0"]
[io.netty/netty-codec-http2 "4.1.8.Final"]
]
:main callj.core
)
but the error $ lein run
Exception in thread "main" java.lang.ClassNotFoundException: com.google.cloud.speech.v1.SpeechClient, compiling:(callj/core.clj:1:1)
still remainsThanks @danielcompton for the help. The remaining problems I have seems to be related to Google's documentation being incorrect.