[ 
https://issues.apache.org/jira/browse/TIKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17293190#comment-17293190
 ] 

ASF GitHub Bot commented on TIKA-94:
------------------------------------

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



##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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

Review comment:
       Please complete

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO
+     */
+
+    public String startTranscribeAudio(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the audio 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeAudio(String filePath, String sourceLanguage) 
throws TikaException, IOException;
+
+    /**
+     * Transcribe the given the video 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 java.io.IOException

Review comment:
       Complete

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO
+     */
+
+    public String startTranscribeAudio(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the audio 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 java.io.IOException

Review comment:
       Please complete

##########
File path: 
tika-transcribe/src/main/java/org/apache/tika/transcribe/AmazonTranscribe.java
##########
@@ -0,0 +1,263 @@
+/*
+ * 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 com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.model.PutObjectRequest;
+import com.amazonaws.services.transcribe.AmazonTranscribeAsync;
+import com.amazonaws.services.transcribe.model.*;
+import org.apache.tika.exception.TikaException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.UUID;
+
+
+public class AmazonTranscribe implements Transcriber {
+
+    public static final String PROPERTIES_FILE = 
"transcribe.amazon.properties";
+    public static final String ID_PROPERTY = "transcribe.AWS_ACCESS_KEY";
+    public static final String SECRET_PROPERTY = "transcribe.AWS_SECRET_KEY";
+    public static final String DEFAULT_ID = "dummy-id";
+    public static final String DEFAULT_SECRET = "dummy-secret";
+    public static final String DEFAULT_BUCKET = "dummy-bucket";
+    public static final String BUCKET_NAME = "transcribe.BUCKET_NAME";
+
+    private static final Logger LOG = 
LoggerFactory.getLogger(AmazonTranscribe.class);
+    private AmazonTranscribeAsync amazonTranscribe;
+    private AmazonS3 amazonS3;
+    private String bucketName;
+    private boolean isAvailable; // Flag for whether or not translation is 
available.
+    private String clientId;
+    private String clientSecret;  // Keys used for the API calls.
+//    private HashSet<String> validSourceLanguages = new 
HashSet<>(Arrays.asList("en-US", "en-GB", "es-US", "fr-CA", "fr-FR", "en-AU",

Review comment:
       Remove

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO

Review comment:
       2.1

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO
+     */
+
+    public String startTranscribeAudio(String filePath) throws TikaException, 
IOException;

Review comment:
       Please change al method names from `startTranscribe...` to simply 
`transcribe...`
   Please also populate this throughout the `tika-transcribe` module. 

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO
+     */
+
+    public String startTranscribeAudio(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the audio 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeAudio(String filePath, String sourceLanguage) 
throws TikaException, IOException;
+
+    /**
+     * Transcribe the given the video 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeVideo(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the video 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 java.io.IOException
+     * @since TODO

Review comment:
       2.1

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO
+     */
+
+    public String startTranscribeAudio(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the audio 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 java.io.IOException
+     * @since TODO

Review comment:
       2.1

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO
+     */
+
+    public String startTranscribeAudio(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the audio 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeAudio(String filePath, String sourceLanguage) 
throws TikaException, IOException;
+
+    /**
+     * Transcribe the given the video 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 java.io.IOException
+     * @since TODO

Review comment:
       2.1

##########
File path: 
tika-transcribe/src/test/java/org/apache/tika/transcribe/AmazonTranscribeSimpleTest.java
##########
@@ -0,0 +1,121 @@
+/*
+ * 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.transcribe.AmazonTranscribe;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+//TODO: Check whether the expected Strings are correct (does it include 
punctuation? case?)
+//TODO: Consider testing longer audio and video file, is there any points 
doing that?

Review comment:
       Please address both of these issues by implementing unit tests.
   One for punctuation and one for a longer file. 

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO
+     */
+
+    public String startTranscribeAudio(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the audio 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeAudio(String filePath, String sourceLanguage) 
throws TikaException, IOException;
+
+    /**
+     * Transcribe the given the video 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeVideo(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the video 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeVideo(String filePath, String sourceLanguage) 
throws TikaException, IOException;
+
+    /**
+     * @return true if this Transcriber is probably able to translate right 
now.
+     * @since Tika TODO

Review comment:
       2.1

##########
File path: 
tika-transcribe/src/main/java/org/apache/tika/transcribe/AmazonTranscribe.java
##########
@@ -0,0 +1,263 @@
+/*
+ * 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 com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.model.PutObjectRequest;
+import com.amazonaws.services.transcribe.AmazonTranscribeAsync;
+import com.amazonaws.services.transcribe.model.*;
+import org.apache.tika.exception.TikaException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.UUID;
+
+
+public class AmazonTranscribe implements Transcriber {

Review comment:
       Add description about required configuration and any specific 
characteristics for this Transcriber

##########
File path: 
tika-transcribe/src/main/java/org/apache/tika/transcribe/AmazonTranscribe.java
##########
@@ -0,0 +1,263 @@
+/*
+ * 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 com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.model.PutObjectRequest;
+import com.amazonaws.services.transcribe.AmazonTranscribeAsync;
+import com.amazonaws.services.transcribe.model.*;

Review comment:
       Never use wildcard imports. All explicitly define the import you need. 

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,90 @@
+/*
+ * 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;
+
+import com.amazonaws.services.transcribe.model.LanguageCode;
+
+
+/**
+ * Interface for Transcriber services.
+ *
+ * @since Tika TODO

Review comment:
       Also please describe the interface. 

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,90 @@
+/*
+ * 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;
+
+import com.amazonaws.services.transcribe.model.LanguageCode;
+
+
+/**
+ * Interface for Transcriber services.
+ *
+ * @since Tika TODO

Review comment:
       Please just add 2.1

##########
File path: tika-core/src/main/java/org/apache/tika/transcribe/Transcriber.java
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 TODO
+ */
+public interface Transcriber {
+    /**
+     * Transcribe the given audio 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
+     * @since TODO
+     */
+
+    public String startTranscribeAudio(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the audio 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeAudio(String filePath, String sourceLanguage) 
throws TikaException, IOException;
+
+    /**
+     * Transcribe the given the video 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 java.io.IOException
+     * @since TODO
+     */
+    public String startTranscribeVideo(String filePath) throws TikaException, 
IOException;
+
+    /**
+     * Transcribe the given the video 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 java.io.IOException

Review comment:
       Complete




----------------------------------------------------------------
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


> Speech recognition
> ------------------
>
>                 Key: TIKA-94
>                 URL: https://issues.apache.org/jira/browse/TIKA-94
>             Project: Tika
>          Issue Type: New Feature
>          Components: parser
>            Reporter: Jukka Zitting
>            Assignee: Lewis John McGibbney
>            Priority: Minor
>              Labels: new-parser
>
> Like OCR for image files (TIKA-93), we could try using speech recognition to 
> extract text content (where available) from audio (and video!) files.
> The CMU Sphinx engine (http://cmusphinx.sourceforge.net/) looks promising and 
> comes with a friendly license.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to