Commit f0054dc2 authored by IT18126884's avatar IT18126884

Update DoubleWords.py FillerWords.py Silence.py

parent e8dd8296
......@@ -20,7 +20,7 @@ doc = nlp(text)
# Tokenization
tokens = [token.text for token in doc]
print("*****Analyze Repeted Words in you're Speech*****");
for i in range(len(tokens)):
if tokens[i] == tokens[i + 1]:
print(f" You stuck in this word :{tokens[i]}");
\ No newline at end of file
......@@ -25,5 +25,5 @@ def wordcount(filename, listwords):
print("Have not filler word")
wordcount("momo.txt", ["Like","you know", "I mean" ,"okay" ,"so", "actually" ,"basically","right"])
\ No newline at end of file
print("********Analyze Filler Word in your Speech********");
wordcount("momo.txt", ["Like", "I mean" ,"okay" ,"so", "actually" ,"basically","right"])
\ No newline at end of file
......@@ -6,6 +6,7 @@ from pydub.silence import split_on_silence
sound = AudioSegment.from_wav("C:/Users/Janitha Akalanka/PycharmProjects/English.wav")
chunks = split_on_silence(sound, min_silence_len=200, silence_thresh=sound.dBFS - 16, keep_silence=150)
# Chunk Folder file Path
chunk_folder_name = "C:/Users/Janitha Akalanka/PycharmProjects/splits_by_pauses"
# create folder to store chunks
......@@ -16,4 +17,7 @@ for i, audio_chunk in enumerate(chunks, start=1):
chunk_file = os.path.join(chunk_folder_name, f"chunk{i}.wav")
audio_chunk.export(chunk_file, format="wav", bitrate='192k')
print("****** How many times User Silence in their Speech *****")
# print count of silence
print(str(len(chunks) - 1) + " : Silence/s found")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment