You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by GitBox <gi...@apache.org> on 2021/03/05 00:00:31 UTC

[GitHub] [tika] rohan2810 commented on a change in pull request #406: WIP: [TIKA-94] Speech-to-text transcription

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



##########
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:
       Yes I have taken this into consideration and pushed changes accordingly.




----------------------------------------------------------------
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:
users@infra.apache.org