Use copied file path in terminal (from applescript and automator)
No need for Automator.

Just use AppleScript (Change /opt/local/bin/tesseract to the output of which tesseract):

set myFile to (choose file with prompt "Choose a file to convert") # Get the file to convert
set myFilePOSIX to the POSIX path of myFile # Get terminal friendly path
set myLocation to (choose folder with prompt "Choose a location to save your file") # Get location to save the file
set myLocationPOSIX to the POSIX path of myLocation
tell application "Finder"
    display dialog "Choose a file name" default answer (name of file myFile as string) # Type the name the file
    set myName to the text returned of the result # Get what user typed
end tell
do shell script "/opt/local/bin/tesseract " &amp; quoted form of myFilePOSIX &amp; " " &amp; quoted form of myLocationPOSIX &amp; quoted form of myName # Do the terminal command