![見出し画像](https://assets.st-note.com/production/uploads/images/156670894/rectangle_large_type_2_7f5cef3c1f339bfa9ac3ce4964352bb9.png?width=1200)
簡単な音声認識テスト( 簡単さ優先、精度非優先 )
!pip install SpeechRecognition
!pip install pydub
import speech_recognition as sr
from pydub import AudioSegment
import os
wav_audio_file = 'temp.wav'
new = AudioSegment.from_wav("Untitled_test.wav")
i = 0
range_n = 3.5 # sec
text = ""
reco = sr.Recognizer()
while range_n*i*1000 <= len(new):
new1 = new[range_n*i*1000 : (range_n*i*1000) + (range_n*1000)] # audio sound copy per 3.5 sec.
new1 = AudioSegment.silent().append(new1.append(AudioSegment.silent(1000)))
i += 1
new1.export(wav_audio_file, format="wav")
with sr.AudioFile(wav_audio_file) as source:
audio = reco.record(source)
try:
recognition_text = reco.recognize_google(audio) # English => language="en-US"
# recognition_text = reco.recognize_google(audio,language='ja-JP') # Japanese
print(f"{recognition_text}\n")
text += f"{recognition_text}\n"
except sr.UnknownValueError:
print("# Recognition could not understand audio")
except sr.RequestError as erorr:
print("# results from Google Speech; {0}".format(erorr))
os.remove(wav_audio_file)
Untitled_test.wav ( podcast audio generated by google notebookLM )
https://www.genspark.ai/search?query=!pip+install+SpeechRecognition%0A!pip+install+pydub%0A%0Aimport+speech_recognition+as+sr%0Afrom+pydub+import+AudioSegment%0A%0Awav_audio_file+=+%27temp.wav%27%0Anew+=+AudioSegment.from_wav(%22Untitled_test.wav%22)%0A%0Ai+=+0%0Arange_n+=+3.5+%23+sec+%0Atext+=+%22%22%0Areco+=+sr.Recognizer()%0Awhile+range_n*i*1000+%3C=+len(new):%0A++++new1+=+new[range_n*i*1000+:+(range_n*i*1000)+%2B+(range_n*1000)]+%0A++++new1+=+AudioSegment.silent().append(new1.append(AudioSegment.silent(1000)))%0A++++i+%2B=+1%0A++++new1.export(%22temp.wav%22,+format=%22wav%22)%0A%0A++++with+sr.AudioFile(wav_audio_file)+as+source:%0A++++++++audio+=+reco.record(source)%0A++++++++try:%0A++++++++++++recognition_text+=+reco.recognize_google(audio)+%23+English+=%3E+language=%22en-US%22%22%22%0A++++++++++++%23+recognition_text+=+reco.recognize_google(audio,language=%27ja-JP%27)%0A++++++++++++print(f%22{recognition_text}%5Cn%22)%0A++++++++++++text+%2B=+f%22{recognition_text}%5Cn%22%0A++++++++except+sr.UnknownValueError:%0A++++++++++++print(%22%23+Recognition+could+not+understand+audio%22)%0A++++++++except+sr.RequestError+as+erorr:%0A++++++++++++print(%22%23+results+from+Google+Speech;+{0}%22.format(erorr))
result
okay so are you ready to kind of
step into a day that really
Shook Japan like to its core
yeah definitely you brought us these first-hand accounts from the 19th
95 Tokyo subway attack orchestrated by
auction riccio the call led by Sahara
bicycle on Sahara and we're not just talking news reports here right now
exactly we're talking about the human side of this tragedy and going
beyond the headlines really trying to piece together a mosaic
of different experiences I think you know what we're really going to get
today is how this event reshaped Japan you know how reshape
their sense of safety their sense of trust really kind of their place in the world
so we're stepping into the shoes of these individuals just a regular day
unfolding another day dedicated station
attended a young software developer heading to work a season
Banker grabbing his morning coffee
can you paint a picture of what life was like for them before that
that fateful morning well it was the life as usual and one of them
most bustling Metropolis on the planet I mean this is Tokyo
you know our station attendant Keokuk Izumi she started
what's your day like any other a simple breakfast with her colleagues before kind of raising
the shutters at the casino that familiar time of the
train doors opening the flood of commuters rushing to work just another day
another busy but routine day or so she thought right
the Sea of commuters we have tomoko takatsuki
are young software developer maybe a little sleepy maybe
don't worry about a presentation checking emails on her flip phone
it's totally oblivious to the horror that is about to unfold
absolutely and then the attack
and here's the thing you know it wasn't a Hollywood style
wasn't some big loud obvious thing and imagine
you're on that train and there's just the subtle scent of
something off a quiet cough
dropped newspaper maybe even a strange oil
we smell almost like isopropyl alcohol
passengers described it as suffocating but nobody could have predicted what
what's happening no absolutely not and and Witnesses recall this kind of
creeping horror this gradual realization that something was
terribly wrong and it's those mundane details that
that morning the unusual quiet of Philip passengers
1 minute you're asking you calling you about a spilled drink the next year
for are and that dropped newspaper you mentioned that
becomes a chillingly Common Thread in these stories often
is to wrap the Saran packages station attendant
toshiaki Toyota a 34-year veteran of the subway
Authority he described mopping up the strength
Angel liquid just assuming it was a harmless spill he had no idea
he was handling sarin and tragically his colleague Takahashi
it wasn't so lucky right he said come to the poison
really highlighting the the chaotic initial response
and that's one of the things that's so so terrifying about this I mean
patients exhibiting these bizarre symptoms and
nobody not even the medical professionals seem to grasp the scale
of what's Happening Now can you imagine the fear
the confusion just scrambling for answers
it's unfathomable I mean it's just it's unfathomable yeah
really hard to Fathom this year Terror that those people almost felt in that
but what's even more unsettling is the attack
wasn't the end of their ordeal the aftermath the scars
the visible and invisible that's what we're diving into now right
that's it yeah life after the attack the indoor
bring Legacy of physical and psychological trauma
some like our station attendant kyoka she escaped
it was relatively minor symptoms but many others they
face a lifetime of debilitating health issues we hear about
chronic headaches blurred vision this constant fatigue
tomoko or software developer she couldn't even look at a computer
screen for for like a week after the attack I can't even imagine
can you imagine trying to explain that to your boss your colleagues
and she even mentions you know being dismissed by some colleagues you know
will your eyes were never that good anyway oh well just
just heartbreaking that invalidation the sense of isolation
turn on top of everything else they're going through right it's like they're suffering
was invisible to those who you know who couldn't understand
exactly and that lack of understanding that inability to
really see these invisible wounds it fueled
this even deeper sense of fear and distrust
think about it you know the very spaces that are designed to keep you safe
the crowded trains the bustling stations
they become sources of anxiety yeah you're constantly looking over your
shoulder wandering could it happen again could it happen to me
play me we hear about you know a woman who's afraid to even leave her house
also loan you know a man who throws himself into work
I tried to prove that he's fine to try to outrun that fear
their routines the things that once gave them comfort
now feel dangerous it's like this attached
shattered their sense of security completely not just in like you know
the world but in their own minds in their own minds yeah and and
the sense of vulnerability it extends Beyond just the individual
this is a society that Prides itself on order
on Collective responsibility and this attack felt like a betrayal
yeah it chipped away at that trust in Authority in this
systems that were meant to protect them so how do you even begin to
help with that you know with with the invisible wounds the fear the shack
I don't trust yeah it's a good question I mean people found
different ways right some people sought Solace and family
in drawing strength from loved ones in their Community other
turn to Faith you know they found comfort in spirituality and
religion and then there were those who coped bye bye
bring themselves into work you know just trying to regain that sense of
control amidst all this chaos yeah I mean it's a testament
to the resilience of the human Spirit isn't it absolutely even in the face
unimaginable trauma people
find ways to survive to keep going
and and sometimes that resilience came in the quietest most
expected forms like you know like the story of shizuko Akashi
the woman severely Addicted by the serum
a shizuko story man imagine she was
really to really even express yourself and she was communicating with her
brother through blinks and and these slight hand gesture
Mercer brother tatsuo I mean what dedication
visiting her every other day patiently coaching her
filling in the gaps in her memory and he talks about the pain
of losing their shared memories you know it felt like they were
cut away with a knife he says and yet even with these
Madden Mobile challenges that shizuka was facing you know when they asked her like what
you want to do and when you get better her answer was so simple
Disneyland Disneyland wow it's incredible that
picture of hope that desire for Joy amidst amidst such
that
was intertwined with another powerful emotion anger
oh yeah burning need for answers for justice this
burning need for answers for justice
it's understandable isn't it that raw that visceral
anger after such a senseless tragedy you'd want someone to answer
for it to make sense of the chaos oh absolutely and and the victim
is their families is there a grappling with so much more than just
their own pain and loss here right they're demanding these answers
from those in power from the very systems that were supposed to protect them
and were those answers found we hear about a man who wanted
beat the criminals to a pulp parents who lost their son
a wife who just who just wanted the truth about her husband's
was there any Solace for them in the aftermath
well and that's that's where this deep dive gets even more complex
does in seeking those answers you have to confront the perpetrators right
you have to confront the the Enigma of alien shinrikyo itself
and and we're not just talking about you know a group of misguided individuals
yeah we're talking about a cult that exerted this powerful and
ultimately terrifying hold over its members so who were
these people drawn to a missionary Kia what were they looking for
I mean imagine the Allure of belonging write the promise of
spiritual enlightenment of answers to Life's big questions
disillusioned with
30 we're searching for meaning but within that promise there was this much dark
surrender the surrender of critical thinking
king of of individual autonomy to the will of one man
choco Sahara is Chillin that that blunt
in faith that willingness to follow a leader down such a
a dangerous path and you have to wonder what happened to those
members after the attack well and their stories really are
pics of disillusionment remorse even continued devotional
turn in some cases some like hiroyuki Cano who worked in
hands Science and Technology division he was
I buy the attack he saw the lack of accountability of the disregard for human life
he cooperated with police but the guilt the weight
if his past association with the cult it continued to haunt
and then you have been so hard when Abu Who Remain devoted to asahara
even after the attack convinced of his innocence claiming
the group was being unfairly targeted I mean it's hard to grasp that level
unwavering belief even in the face of such horror not exactly
and it really underscores the complexities of Cults right the psychological
manipulation the fear this this distorted reality
Rita keeps people trapped and and remember that so
talking about the shared memories being cut away with a knife that's what
these cult members experience you know it's like a mental
covering from the outside world from from reason itself
so where does that leave us what can we truly take away from
from this deep dive into the Tokyo subway attack I think you know
at its core it's a stark reminder of the fragility
the systems that we rely on the speed at which order can just
dissolve into chaos you know it really begs the question how would we
you reacted in those terrifying moments you know would we have been the bike
standard or would we have been the one offering a helping hand
to unpack it is but I think by listening to these
individual stories by grappling with these with these
comfortable truths that they reveal we honor the victims
we learn from the past and hopefully you know maybe we become a little
or where a little bit more prepared for the unexpected because as
we've heard sometimes the most important things to remember
Amber are the quietest Whispers the human stories behind
find the headlines that's it