How to get word level timestamps with External Language Model?
@anujsuchchal  Did you come across a solution for this? @ShantanuNair Yes. For this I am using another CTC Beam Search Decoder package by [Parlance](https://github.com/parlance/ctcdecode). 
This returns timesteps of characters as well in addition to Beam results which you can use to align Audio with Transcript. Hope this helps.
Closing this issue now.


 @ShantanuNair and @anujsuchchal I've tried CTC decoder package by parlance to get the time stamp for the output for conformer-CTC model. I'm getting output but unable to understand how to get the timestamp for each word. Can you guys help me with this?
 @dbkalaria did you ever manage to figure out how to use the timestamp information to calculate word-level timestamps? I am stuck on the same problem too. @abarcovschi Yes I was able to extract word-level timestamp information although it was not that accurate and I had tried that about 2 years ago, didn't know whether they had added that feature or not as there was no direct implementation at that time. 

FYI, I tried different options like vosk, whisper, etc and ended up using whisper model for my task. I was able to extract word-level timestamp information in the following way:

Using `transcribe_speech.py` with the `compute_timestamps=True` argument, the `transcriptions` object is a list of `Hypothesis` objects that have a `timestep` instance variable, which is a dictionary that has a `word` field, which is a list of dictionary objects that contain the start and end timestep (offset) for each word in the transcription text.

The start and end offset for each word can be converted to the start and end time, in seconds, for each word in the audio file using the following code:

```
# create config object from config yaml file of the model.
cfg = Config(os.path.join(args.model_folder_path, "hparams.yaml"))

# get the seconds duration of a timestep at output of the Conformer.
time_stride = 4 * cfg.get("cfg/preprocessor/window_stride")

# for each word dict:
start_time = word['start_offset'] * time_stride
stop_time = word['end_offset'] * time_stride
```

**NOTE:** I am using a Conformer model here, so the time_stride has a multiplication factor of 4, I am not sure if it is different for other types of ASR models.

How can we get word level timestamps for the output words of external LM?

Since the word timestamps logic given in Offline_ASR.ipynb works on Greedy CTC decoder. Number of words in Greedy decoder and Beam Search decoder are usually different so we can't use this logic with Beam Search Decoder.

Is there any way to do this? I have seen some code related to timesteps in source code of ctcdecode package, do I need to try to implement greedy decoder logic into source code of ctcdecode to return timestamps and build it again? Or there is any function/package already available?

Please help.