Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3755300
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:40:38+00:00 2026-05-19T09:40:38+00:00

I am using a Voice-to-Text application which gives transcription files as output.. The transcribed

  • 0

I am using a Voice-to-Text application which gives transcription files as output.. The transcribed text contains a few tags like (s) (for sentence beginning)..(/s)( for sentence end ).. (VOCAL_NOISE)(for un-recognized words).. but the text also contains unwanted tags like (VOCAL_N) , (VOCAL_NOISED) , (VOCAL_SOUND), (UNKNOWN).. i am using SED to process the text.. but cannot write an appropriate regex to replace all other tags except (s), (/s) and (VOCAL_NOISE), with the tag ~NS.. would appreciate if someone could help me with it..

Example text:

(s) Hi Stacey , this is Stanley (/s) (s) I would (VOCAL_N) appreciate if you could call (UNKNOWN) and let him know I want an appointment (VOCAL_NOISE) with him (/s)

Output should be:

(s) Hi Stacey , this is Stanley (/s) (s) I would ~NS appreciate if you could call ~NS and let him know I want an appointment (VOCAL_NOISE) with him (/s)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:40:39+00:00Added an answer on May 19, 2026 at 9:40 am

    This should take care of it:

    sed 's|([^)]*)|\n&\n|g;s@\n\((/\?s)\|(VOCAL_NOISE)\)\n@\1@g;s|\n\(([^)]*)\)\n|~NS|g' inputfile
    

    Explanation:

    • s|([^)]*)|\n&\n|g – divide the line by putting every parenthesized string between two newlines
    • s@\n\((/\?s)\|(VOCAL_NOISE)\)\n@\1@g – remove the newlines around “(s)”, “(/s)” and
      “(VOCAL_NOISE)” (keepers)
    • s|\n\(([^)]*)\)\n|~NS|g – replace anything else between newlines that is within parentheses with “~NS”

    This works since newlines are guaranteed not to appear within a newly read line of text.

    Edit: Shortened the command by using alternation \(foo\|bar\)

    Previous version:

        sed 's|([^)]*)|\n&\n|g;s|\n\((/\?s)\)\n|\1|g; s|\n\((VOCAL_NOISE)\)\n|\1|g;s|\n\(([^)]*)\)\n|~NS|g' inputfile
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I developed an application which converts from voice to text using SAPI 5.1 .
I am developing android application in which I am using text to speech conversion.What
I'm using a phone API called Twilio and it does text to voice. I'm
I am using SppechRecognizer for voice recognizer application. Its working fine. My requirement is
I'm currently writing an application that uses the users voice to send out text
If anybody knows about 'voice to text' conversion using java, please give me some
I have a list like this, TYPE FROM TO voice CALLER_A CALLER_B text CALLER_A
I am writing an OS X application which uses NSSpeechSynthesizer to read text to
I am using SpeechLib for a very simple text to voice conversion. Works great
Is it possible to convert voice mail into text using PHP? Is there any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.