lewismc commented on a change in pull request #406:
URL: https://github.com/apache/tika/pull/406#discussion_r586749707



##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tika.transcribe;
+
+import org.apache.tika.exception.TikaException;
+
+import java.io.IOException;
+
+/**
+ * Interface for Transcriber services.
+ *
+ * @since Tika 2.1
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given file.
+     *
+     * @param filePath The path of the file to be transcribed.
+     * @return key for transcription lookup
+     * @throws TikaException When there is an error transcribing.
+     * @throws IOException   If an I/O exception of some sort has occurred.
+     * @since 2.1
+     */
+    public String transcribe(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the file and the source language.
+     *
+     * @param filePath       The path of the file to be transcribed.
+     * @param sourceLanguage The language code for the language used in the 
input media file.
+     * @return key for transcription lookup
+     * @throws TikaException When there is an error transcribing.
+     * @throws IOException   If an I/O exception of some sort has occurred.
+     * @since 2.1
+     */
+    public String transcribe(String filePath, String sourceLanguage) throws 
TikaException, IOException;

Review comment:
       Please change this from `transcribe(String filePath, String 
sourceLanguage
   )` to `transcribe(InputStream is, String sourceLanguage)`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to