@@ -80,12 +80,9 @@ export function useHelpdeskGame(options: {
8080 const isSpeechSupported =
8181 typeof window !== 'undefined' &&
8282 ! ! (
83- // eslint-disable-next-line @typescript-eslint/no-explicit-any
84- (
85- ( window as any ) . SpeechRecognition ||
86- // eslint-disable-next-line @typescript-eslint/no-explicit-any
87- ( window as any ) . webkitSpeechRecognition
88- )
83+ ( window as Window & { SpeechRecognition ?: unknown } ) . SpeechRecognition ||
84+ ( window as Window & { webkitSpeechRecognition ?: unknown } )
85+ . webkitSpeechRecognition
8986 ) &&
9087 ! ! window . speechSynthesis ;
9188
@@ -230,12 +227,12 @@ export function useHelpdeskGame(options: {
230227 const hasTextTurn = currentTurns . some ( ( t ) => t . inputMethod === 'text' ) ;
231228 const textInputMetrics : TextInputMetrics | null = hasTextTurn
232229 ? {
233- typingIntervalVariance :
234- typingVariancesRef . current . length > 0
235- ? typingVariancesRef . current . reduce ( ( a , b ) => a + b , 0 ) /
236- typingVariancesRef . current . length
237- : 0 ,
238- }
230+ typingIntervalVariance :
231+ typingVariancesRef . current . length > 0
232+ ? typingVariancesRef . current . reduce ( ( a , b ) => a + b , 0 ) /
233+ typingVariancesRef . current . length
234+ : 0 ,
235+ }
239236 : null ;
240237 const game2Data : Game2Data = {
241238 inputMethod : inputMethodRef . current ,
@@ -248,7 +245,7 @@ export function useHelpdeskGame(options: {
248245
249246 // 電話終了音
250247 if ( hangupAudioRef . current ) {
251- hangupAudioRef . current . play ( ) . catch ( ( ) => { } ) ;
248+ hangupAudioRef . current . play ( ) . catch ( ( ) => { } ) ;
252249 }
253250 } , [ onComplete ] ) ;
254251
@@ -559,7 +556,7 @@ export function useHelpdeskGame(options: {
559556 const silentAudio = new Audio ( ) ;
560557 silentAudio . src =
561558 'data:audio/wav;base64,UklGRigAAABXQVZFRm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA=' ;
562- silentAudio . play ( ) . catch ( ( ) => { } ) ;
559+ silentAudio . play ( ) . catch ( ( ) => { } ) ;
563560
564561 // マイクの事前許可を求める
565562 try {
@@ -581,7 +578,7 @@ export function useHelpdeskGame(options: {
581578
582579 // 電話呼び出し音を開始
583580 if ( callingAudioRef . current ) {
584- callingAudioRef . current . play ( ) . catch ( ( ) => { } ) ;
581+ callingAudioRef . current . play ( ) . catch ( ( ) => { } ) ;
585582 }
586583 } , [ gamePhase ] ) ;
587584
0 commit comments