How does Samsung's Voice Recorder's Speech-to-text function store the text and sync it with the audio?


Question

I am using Samsung Galaxy S7 and recently, I used the speech-to-text feature in the default Voice Recorder application. When I play one of the audio files that was recorded with that feature, the application is able to show the text in sync with the audio. I saw that there was the text stored in another text file together with the audio file, but it was just the raw text. I'm trying to figure out how this works.


Is this information for syncing the text and audio stored in the audio file? In this case, all the recordings are only in M4A files. Hence, I tried searching what M4A files can store, like if they can store subtitles because it would seem that it could be subtitles that enable this syncing. However, I can't seem to find any information on this. Or it could also be that the application just has this information stored in some sort of storage or cache, which would mean that if I moved the files over to my computer, there would not be any text synced with the audio.


Answer

I guess I have found the answer after looking within the M4A files themselves. The text and the timestamps, if I am correct, are stored in the M4A files.


I looked through the binary data of the file using a hex editor and just the normal Notepad application in Windows and I found all the text within a location and it looks like Java was used. I am guessing this is only a feature designed particularly for the Samsung Voice Recorder application.


A sample is shown here (with some parts and most of the weird characters removed):


;com.sec.android.app.voicenote.common.util.VoiceRecorderData 
mCategoryNamet Ljava/lang/String;L mEffectNameq ~ java.util.ArrayListx sizexp 2com.sec.android.app.voicenote.common.util.TextData ConfidenceScoreI dataTypeJ durationJ elapsedTimeJ timeStamp[ mTextt [Ljava/lang/String; [Ljava.lang.String;{
t The pppppppppsq ~
t
recording pppppppppsq ~
t to pppppppppsq ~

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes