Python Forum
[split] Offline audio to text (Speech Recognition)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Offline audio to text (Speech Recognition)
#1
Hi I am using the same library and its working fine.
But I need timing of words also.
Is there any way in this library or any other library to get the timings.

I am trying to convert a speech in Hindi language to text.
I have tried to use amazon speech to text but results are pathetic.
I tried to google speech(with long recognise) to text it is giving words with timing but converting 10 lines of sentence in to 2 line only means I am not getting most of the words.
Code :

import time
from google.cloud import speech
client = speech.SpeechClient()
operation = client.long_running_recognize(audio=speech.types.RecognitionAudio(uri='gs://bucketname/samplefile.wav'), config=speech.types.RecognitionConfig(encoding='LINEAR16', language_code='en-US'))
retry_count = 100
print(operation)
for result in operation.results:
	for alternative in result.alternatives:
		print('=' * 20)
		print(alternative.transcript)
		print(alternative.confidence)
Is there any way to get it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad How to split a String from Text Input into 40 char chunks? lastyle 7 1,054 Aug-01-2023, 09:36 AM
Last Post: Pedroski55
  Controlling text-to-speech pauses with pyttsx3 pmac1300 4 4,322 Mar-14-2022, 06:47 AM
Last Post: Coricoco_fr
  Using import in python script offline - HELP!! blackhatter1001001 1 2,220 Jul-25-2021, 05:57 AM
Last Post: ndc85430
  [split] Change Text Size in Console? CodingKid 1 1,848 Jul-20-2021, 02:47 PM
Last Post: deanhystad
  Speech Recognition with timestamps DeanAseraf1 3 6,499 Jun-27-2021, 06:58 PM
Last Post: gh_ad
  [split] How to convert the CSV text file into a txt file Pinto94 5 3,248 Dec-23-2020, 08:04 AM
Last Post: ndc85430
  Split gps files based on time (text splitting) dervast 0 1,850 Nov-09-2020, 09:19 AM
Last Post: dervast
  Continous Speech Recognition dell91 0 1,807 Oct-29-2020, 10:51 AM
Last Post: dell91
  [split] Image recognition technique. SrinavasRao 3 1,987 Sep-22-2020, 07:32 AM
Last Post: hussainmujtaba
  How to Split Output Audio on Text to Speech Code Base12 2 6,784 Aug-29-2020, 03:23 AM
Last Post: Base12

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020